clusterctl config init
clusterctl config init
Write a first configuration to fill in
Synopsis
Write the least configuration that resolves, one document to a file: a Config with one context, a Site with a login node, a Cluster and an empty NodeInventory. The comments in each file say what to fill in; then check the result with “clusterctl config validate” and “clusterctl doctor”.
Without DIR the files are written where configuration is read from: the directory –config or CLUSTERCTL_CONFIG names, or else your own configuration directory, usually ~/.config/clusterctl. When either names several places, name the one to write to, and so when /etc/clusterctl, which is read together with your own directory, holds configuration already. Directories that are missing are created.
The directory has to be empty. One that holds anything, hidden files included, is refused rather than added to: this command writes nothing next to files it did not write, and overwrites nothing.
clusterctl config init clusterctl config init –site lab –cluster alpha –domain hpc.example.org –user alice_adm clusterctl config init ./site-config –dry-run
clusterctl config init [DIR] [flags]Options
--cluster string name of the Cluster document and of the context that acts on it (default "cluster1")
--domain string DNS domain of the cluster nodes (default "hpc.example.org")
-h, --help help for init
--login string host name of the login node (default: login in the domain)
--site string name of the Site document (default "example")
--user string remote account to log in as (default: left to ssh)Options inherited from parent commands
--config strings configuration file or directory to read, repeatable (default: CLUSTERCTL_CONFIG or the search path)
--context string context to act on (default: the current one)
--dry-run report what would be done and change nothing
--fanout int how many hosts to work on at once, at least 1 (default: from the configuration)
--force allow protected hosts, and nodes the inventory does not know, to be touched
-n, --nodes stringArray node set to act on, for example 'exe[1-10],@rack:R02' (default: CLUSTERCTL_NODES)
-o, --output string output format: table, wide, json, yaml, nodeset, name, jsonpath=, jq= (default "table")
--set stringArray override one configuration value as PATH=VALUE, repeatable
-y, --yes answer the confirmation prompts with yesSEE ALSO
- clusterctl config - Start, inspect and check the configuration