Skip to content

chalkctl client new

chalkctl client new [flags]

Writes a client file: a new key with a certificate from the OS CA for --name and --role, and the OS CA that nodes' certificates chain to. The file goes to ~/.config/chalkos/config unless --out names another; commands read it from there, or from the path --config or $CHALKOSCONFIG names. A client file names no cluster: its OS CA ties it to one, and a node of another cluster fails the TLS handshake, which chalkctl reports as a node that does not accept the client file.

A client file works for bootstrap, disks, etcd leave, etcd members, etcd remove-member, logs, node activate, node diag, node reboot, node revoke, node routes, node unrevoke, registry delete, registry gc, registry list, registry push, secureboot enroll, status, storage reset and upgrade; every other command needs the secrets file or neither file. A reader may read nodes' information, disks, status and logs, etcd's members and the cluster registry's images; an operator may also upgrade, activate staged images, reboot, drain and uncordon nodes; an admin may call every method of chalkd but the node's own renewal, and push, delete and collect garbage in the cluster registry. See chalkd checks the role of every request.

The command needs the secrets file and no inventory.

Flags

Flag Type Default Description
--force boolean false Replace an existing file.
--identity list of string ~/.config/chalkos/age.key, ~/.ssh/id_ed25519, ~/.ssh/id_rsa File holding an age identity to decrypt the secrets with; may be repeated.
--name string required The user's name, which the certificate carries.
--out string ~/.config/chalkos/config File to write.
--role string required The role the certificate grants: admin, operator or reader.
--secrets string — Cluster secrets path (.age, .enc.*, or plaintext), provider URI, or - for standard input.
--ttl duration 8760h0m0s Validity of the certificate.

Examples

# A reader's client file for a dashboard.
chalkctl client new --name grafana --role reader --ttl 720h --out grafana.json --secrets secrets.age

# The operator's own client file, at ~/.config/chalkos/config.
chalkctl client new --name alice --role operator --secrets secrets.age

See also