KUBERNETES(1)(kubernetes)
π KUBERNETES(1) β the kubeadm join page π
okay bestie, so this is a page from the kubernetes manual, and the og author energy is Eric Paris, Jan 2015. Pull up a chair, we're joining a cluster π
πΈ NAME πΈ
kubeadm join β run this on any machine you wish to join an existing cluster β¨
β¨ SYNOPSIS β¨
kubeadm join [OPTIONS]
π DESCRIPTION π
So when you're joining a kubeadm-initialized cluster, we gotta establish bidirectional trust β it's giving mutual, it's giving reciprocal π«Ά. This splits into two whole things:
- discovery β where the Node trusts the Kubernetes Control Plane
- TLS bootstrap β where the Kubernetes Control Plane trusts the Node
There are 2 main schemes for discovery, no more no less:
- Use a shared token along with the IP address of the API server.
- Provide a file β a subset of the standard kubeconfig file.
The discovery/kubeconfig file supports token, client-go authentication plugins ("exec"), "tokenFile", and "authProvider". This file can be a local file or downloaded via an HTTPS URL. The forms are:
kubeadm join --discovery-token abcdef.1234567890abcdef 1.2.3.4:6443
kubeadm join --discovery-file path/to/file.conf
kubeadm join --discovery-file https://url/file.conf
Only one form can be used. Periodt. And if the discovery information is loaded from a URL, HTTPS must be used β also, in that case the host installed CA bundle is used to verify the connection. no exceptions, bestie π
If you use a shared token for discovery, you should also pass the --discovery-token-ca-cert-hash flag to validate the public key of the root certificate authority (CA) presented by the Kubernetes Control Plane. The value of this flag is specified as ":", where the supported hash type is "sha256". The hash is calculated over the bytes of the Subject Public Key Info (SPKI) object (as in RFC7469) π§. This value is available in the output of kubeadm init, or can be calculated using standard tools. The --discovery-token-ca-cert-hash flag may be repeated multiple times to allow more than one public key β iconic behavior, honestly.
β οΈ If you cannot know the CA public key hash ahead of time, you can pass the --discovery-token-unsafe-skip-ca-verification flag to disable this verification. This weakens the kubeadm security model since other nodes can potentially impersonate the Kubernetes Control Plane. like... it's literally called unsafe, bestie, read the room π
The TLS bootstrap mechanism is also driven via a shared token. This is used to temporarily authenticate with the Kubernetes Control Plane to submit a certificate signing request (CSR) for a locally created key pair. By default, kubeadm will set up the Kubernetes Control Plane to automatically approve these signing requests β¨. This token is passed in with the --tls-bootstrap-token abcdef.1234567890abcdef flag.
Often times the same token is used for both parts. In this case, the --token flag can be used instead of specifying each token individually. efficient queen π
The join [api-server-endpoint] command executes the following phases:
preflight Run join pre-flight checks
control-plane-prepare Prepare the machine for serving a control plane
/download-certs Download certificates shared among control-plane nodes from the kubeadm-certs Secret
/certs Generate the certificates for the new control plane components
/kubeconfig Generate the kubeconfig for the new control plane components
/control-plane Generate the manifests for the new control plane components
kubelet-start Write kubelet settings, certificates and (re)start the kubelet
etcd-join Join etcd for control plane nodes
kubelet-wait-bootstrap Wait for the kubelet to bootstrap itself
control-plane-join Join a machine as a control plane instance
/mark-control-plane Mark a node as a control-plane
wait-control-plane Wait for the control plane to start
π OPTIONS π
--apiserver-advertise-address=""β if the node should host a new control plane instance, the IP address the API Server will advertise it's listening on. If not set, the default network interface will be used.--apiserver-bind-port=6443β if the node should host a new control plane instance, the port for the API Server to bind to.--certificate-key=""β use this key to decrypt the certificate secrets uploaded by init. The certificate key is a hex encoded string that is an AES key of size 32 bytes.--config=""β path to a kubeadm configuration file.--control-plane=falseβ create a new control plane instance on this node.--cri-socket=""β path to the CRI socket to connect. If empty, kubeadm will try to auto-detect this value; use this option only if you have more than one CRI installed or if you have a non-standard CRI socket.--discovery-file=""β for file-based discovery, a file or URL from which to load cluster information.--discovery-token=""β for token-based discovery, the token used to validate cluster information fetched from the API server.--discovery-token-ca-cert-hash=[]β for token-based discovery, validate that the root CA public key matches this hash (format:":").--discovery-token-unsafe-skip-ca-verification=falseβ for token-based discovery, allow joining without--discovery-token-ca-cert-hashpinning.--dry-run=falseβ don't apply any changes; just output what would be done. window shopping fr π--ignore-preflight-errors=[]β a list of checks whose errors will be shown as warnings. Example:'IsPrivilegedUser,Swap'. Value'all'ignores errors from all checks.--node-name=""β specify the node name.--patches=""β path to a directory that contains files named"target[suffix][+patchtype].extension". For example,"kube-apiserver0+merge.yaml"or just"etcd.json"."target"can be one of"kube-apiserver","kube-controller-manager","kube-scheduler","etcd","kubeletconfiguration","corednsdeployment","kubeproxydaemonset"."patchtype"can be one of"strategic","merge"or"json"and they match the patch formats supported by kubectl. The default"patchtype"is"strategic"."extension"must be either"json"or"yaml"."suffix"is an optional string that can be used to determine which patches are applied first alpha-numerically.--skip-phases=[]β list of phases to be skipped.--tls-bootstrap-token=""β specify the token used to temporarily authenticate with the Kubernetes Control Plane while joining the node.--token=""β use this token for both discovery-token and tls-bootstrap-token when those values are not provided.
π OPTIONS INHERITED FROM PARENT COMMANDS π
--rootfs=""β the path to the'real'host root filesystem. This will cause kubeadm to chroot into the provided path.--version=falseβ--version,--version=rawprints version information and quits;--version=vX.Y.Z...sets the reported version.
π¦ SEE ALSO π¦
kubeadm(1), kubeadm-join-phase(1),
π HISTORY π
January 2015, originally compiled by Eric Paris (eparis at redhat dot com) based on the kubernetes source material β but hopefully they have been automatically generated since! π
and that's the whole page, bestie πβ¨ go forth and join that cluster, you absolute main character π
this was the Manuals / User page for KUBERNETES(1)(kubernetes) β take care of her π«ΆπΈ
π¦ where this page comes from
- arch rolling: kubeadm 1.37.2-1 Β· Apache-2.0
- fedora 43: kubernetes1.37-kubeadm 1.37.0-3.fc43
- fedora 43: kubernetes1.37-kubeadm 1.37.1-1.fc43 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-3-Clause-HP AND CC-BY-4.0 AND ISC AND MIT AND MPL-2.0
- fedora 44: kubernetes1.37-kubeadm 1.37.0-3.fc44
- fedora 44: kubernetes1.37-kubeadm 1.37.1-1.fc44 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-3-Clause-HP AND CC-BY-4.0 AND ISC AND MIT AND MPL-2.0
- nixpkgs unstable: kubernetes 1.37.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms