Skip to main content

CLI Tools

The K3s binary contains a number of additional tools the help you manage your cluster.

CommandDescription
k3s serverRun a K3s server node, which launches the Kubernetes apiserver, scheduler, controller-manager, and cloud-controller-manager components, in addition a datastore and the agent components. See the k3s server command documentation for more information.
k3s agentRun the K3s agent node, which launches containerd, flannel, kube-router network policy controller, and the Kubernetes kubelet and kube-proxy components. See the k3s agent command documentation for more information.
k3s kubectlRun the embedded kubectl command. This is a CLI for interacting with the Kubernetes apiserver. If the KUBECONFIG environment variable is not set, this will automatically attempt to use the kubeconfig at /etc/rancher/k3s/k3s.yaml.
k3s crictlRun the embedded crictl command. This is a CLI for interacting with Kubernetes's container runtime interface (CRI). Useful for debugging.
k3s ctrRun the embedded ctr command. This is a CLI for containerd, the container daemon used by K3s. Useful for debugging.
k3s tokenManage bootstrap tokens. See the k3s token command documentation for more information.
k3s etcd-snapshotPerform on demand backups of the K3s cluster data and upload to S3. See the k3s etcd-snapshot command documentation for more information.
k3s secrets-encryptConfigure K3s to encrypt secrets when storing them in the cluster. See the k3s secrets-encrypt command documentation for more information.
k3s certificateManage K3s certificates. See the k3s certificate command documentation for more information.
k3s completionGenerate shell completion scripts for k3s
k3s helpShows a list of commands or help for one command