text
stringlengths
1
1k
id
int64
0
8.58k
fore you upgrade to a newer version of Kubernetes. List of deprecated feature gates: kubeadm deprecated feature gates Feature Default UpgradeAddonsBeforeControlPlane false Feature gate descriptions: UpgradeAddonsBeforeControlPlan
5,800
This is as a disabled feature gate that was introduced for Kubernetes v1.28, in order to allow reactivating a legacy and deprecated behavior during cluster upgrade. For kubeadm versions prior to v1.28, kubeadm upgrades cluster addons (including CoreDNS and kube- proxy) immediately during kubeadm upgrade apply , regardless of whether there are other control plane instances that have not been upgraded. This may cause compatibility problems. Since v1.28, kubeadm defaults to a mode that always checks whether all the control plane instances have been upgraded before starting to upgrade the addons. This behavior is applied to both kubeadm upgrade apply and kubeadm upgrade node . kubeadm determines whether a control plane instance has been upgraded by checking whether the image of the kube-apiserver Pod has been upgraded. You must perform control plane instances upgrade sequentially or at least ensure that the last control plane instance upgrade is not started until all the other control pl
5,801
ane instances have been upgraded completely, and the addons upgrade will be performed after the last control plane instance is upgraded. The deprecated UpgradeAddonsBeforeControlPlane feature gate gives you a chance to keep the old upgrade behavior. You should not need this old behavior; if you do, you should consider changing your cluster or upgrade processes, as this feature gate will be removed in a future release. List of removed feature gates: kubeadm removed feature gates Feature Alpha Beta GARemoved IPv6DualStack 1.16 1.21 1.231.24 UnversionedKubeletConfigMap 1.22 1.23 1.251.26 Feature gate descriptions: IPv6DualStack This flag helps to configure components dual stack when the feature is in progress. For more details on Kubernetes dual-stack support see Dual-stack support with kubeadm . UnversionedKubeletConfigMap This flag controls the name of the ConfigMap where kubeadm stores kubelet configuration data. With this flag not specified or set to true, the ConfigMap is named ku
5,802
belet-config . If you set this flag to false, the name of the ConfigMap includes the major and minor version for Kubernetes (for example: kubelet-config-1.29 ). Kubeadm ensures that RBAC rules for reading and writing that ConfigMap are appropriate for the value you set. When kubeadm writes this ConfigMap (during kubeadm init or kubeadm upgrade apply ), kubeadm respects the value of UnversionedKubeletConfigMap . When reading that ConfigMap (during kubeadm join , kubeadm reset , kubeadm upgrade ... ), kubeadm attempts to use unversioned ConfigMap name first; if that does not succeed, kubeadm falls back to using the legacy (versioned) name for that ConfigMap. Adding kube-proxy parameters For information about kube-proxy parameters in the kubeadm configuration see: kube-proxy reference For information about enabling IPVS mode with kubeadm see: IPVS•
5,803
Passing custom flags to control plane components For information about passing flags to control plane components see: control-plane-flags Running kubeadm without an Internet connection For running kubeadm without an Internet connection you have to pre-pull the required control- plane images. You can list and pull the images using the kubeadm config images sub-command: kubeadm config images list kubeadm config images pull You can pass --config to the above commands with a kubeadm configuration file to control the kubernetesVersion and imageRepository fields. All default registry.k8s.io images that kubeadm requires support multiple architectures. Using custom images By default, kubeadm pulls images from registry.k8s.io . If the requested Kubernetes version is a CI label (such as ci/latest ) gcr.io/k8s-staging-ci-images is used. You can override this behavior by using kubeadm with a configuration file . Allowed customization are: To provide kubernetesVersion which affects the ver
5,804
sion of the images. To provide an alternative imageRepository to be used instead of registry.k8s.io . To provide a specific imageRepository and imageTag for etcd or CoreDNS. Image paths between the default registry.k8s.io and a custom repository specified using imageRepository may differ for backwards compatibility reasons. For example, one image might have a subpath at registry.k8s.io/subpath/image , but be defaulted to my.customrepository.io/ image when using a custom repository. To ensure you push the images to your custom repository in paths that kubeadm can consume, you must: Pull images from the defaults paths at registry.k8s.io using kubeadm config images {list| pull}. Push images to the paths from kubeadm config images list --config=config.yaml , where config.yaml contains the custom imageRepository , and/or imageTag for etcd and CoreDNS. Pass the same config.yaml to kubeadm init . Custom sandbox (pause) images To set a custom image for these you need to configure t
5,805
his in your container runtime to use the image. Consult the documentation for your container runtime to find out how to change this• • • • • •
5,806
setting; for selected container runtimes, you can also find advice within the Container Runtimes topic. Uploading control-plane certificates to the cluster By adding the flag --upload-certs to kubeadm init you can temporary upload the control-plane certificates to a Secret in the cluster. Please note that this Secret will expire automatically after 2 hours. The certificates are encrypted using a 32byte key that can be specified using --certificate- key. The same key can be used to download the certificates when additional control-plane nodes are joining, by passing --control-plane and --certificate-key to kubeadm join . The following phase command can be used to re-upload the certificates after expiration: kubeadm init phase upload-certs --upload-certs --config =SOME_YAML_FILE Note: A predefined certificateKey can be provided in InitConfiguration when passing the configuration file with --config . If a predefined certificate key is not passed to kubeadm init and kubeadm init
5,807
phase upload- certs a new key will be generated automatically. The following command can be used to generate a new key on demand: kubeadm certs certificate-key Certificate management with kubeadm For detailed information on certificate management with kubeadm see Certificate Management with kubeadm . The document includes information about using external CA, custom certificates and certificate renewal. Managing the kubeadm drop-in file for the kubelet The kubeadm package ships with a configuration file for running the kubelet by systemd . Note that the kubeadm CLI never touches this drop-in file. This drop-in file is part of the kubeadm DEB/RPM package. For further information, see Managing the kubeadm drop-in file for systemd . Use kubeadm with CRI runtimes By default kubeadm attempts to detect your container runtime. For more details on this detection, see the kubeadm CRI installation guide . Setting the node name By default, kubeadm assigns a node name based on a machine's host
5,808
address. You can override this setting with the --node-name flag. The flag passes the appropriate --hostname-override value to the kubelet. Be aware that overriding the hostname can interfere with cloud providers
5,809
Automating kubeadm Rather than copying the token you obtained from kubeadm init to each node, as in the basic kubeadm tutorial , you can parallelize the token distribution for easier automation. To implement this automation, you must know the IP address that the control-plane node will have after it is started, or use a DNS name or an address of a load balancer. Generate a token. This token must have the form <6 character string>.<16 character string> . More formally, it must match the regex: [a-z0-9]{6}\.[a-z0-9]{16} . kubeadm can generate a token for you: kubeadm token generate Start both the control-plane node and the worker nodes concurrently with this token. As they come up they should find each other and form the cluster. The same --token argument can be used on both kubeadm init and kubeadm join . Similar can be done for --certificate-key when joining additional control-plane nodes. The key can be generated using: kubeadm certs certificate-key Once the cluster is up, you ca
5,810
n use the /etc/kubernetes/admin.conf file from a control-plane node to talk to the cluster with administrator credentials or Generating kubeconfig files for additional users . Note that this style of bootstrap has some relaxed security guarantees because it does not allow the root CA hash to be validated with --discovery-token-ca-cert-hash (since it's not generated when the nodes are provisioned). For details, see the kubeadm join . What's next kubeadm init phase to understand more about kubeadm init phases kubeadm join to bootstrap a Kubernetes worker node and join it to the cluster kubeadm upgrade to upgrade a Kubernetes cluster to a newer version kubeadm reset to revert any changes made to this host by kubeadm init or kubeadm join kubeadm join This command initializes a Kubernetes worker node and joins it to the cluster. Run this on any machine you wish to join an existing cluster Synopsis When joining a kubeadm initialized cluster, we need to establish bidirectional trust.
5,811
This is split into discovery (having the Node trust the Kubernetes Control Plane) and TLS bootstrap (having the Kubernetes Control Plane trust the Node). There are 2 main schemes for discovery. The first is to use a shared token along with the IP address of the API server. The second is to provide a file - a subset of the standard kubeconfig1. 2. 3. • • •
5,812
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, or kubeadm join --discovery-file https://url/file.conf. Only one form can be used. 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. 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 "<hash-type>:<hex-encoded-value>", 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
5,813
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. 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. 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 toke
5,814
n individually. 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 [EXPERIMENTAL] 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 control-plane-join Join a machine as a control plane instance /etcd Add a new local etcd member /update-status Register the new control-plane node into the ClusterStatus maintained in the kubeadm-config ConfigMap (DEPRECATED) /mark-control-plane Mark a node as a control-plane kube
5,815
adm join [api-server-endpoint] [flags] Options --apiserver-advertise-address string 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
5,816
--apiserver-bind-port int32     Default: 6443 If the node should host a new control plane instance, the port for the API Server to bind to. --certificate-key string 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 string Path to a kubeadm configuration file. --control-plane Create a new control plane instance on this node --cri-socket string 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 non-standard CRI socket. --discovery-file string For file-based discovery, a file or URL from which to load cluster information. --discovery-token string For token-based discovery, the token used to validate cluster information fetched from the API server. --discovery-token-ca-cert-hash strings For token-based discovery, validate that the root CA public key matches this hash (format
5,817
: "<type>:<value>"). --discovery-token-unsafe-skip-ca-verification For token-based discovery, allow joining without --discovery-token-ca-cert-hash pinning. --dry-run Don't apply any changes; just output what would be done. -h, --help help for join --ignore-preflight-errors string
5,818
A list of checks whose errors will be shown as warnings. Example: 'IsPrivilegedUser,Swap'. Value 'all' ignores errors from all checks. --node-name string Specify the node name. --patches string 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". "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 strings List of phases to be skipped --tls-bootstrap-token string Specify the token used to temporarily authenticate with the Kubernetes Control Plane while joining the node. --token string Use this token for both d
5,819
iscovery-token and tls-bootstrap-token when those values are not provided. Options inherited from parent commands --rootfs string [EXPERIMENTAL] The path to the 'real' host root filesystem. The join workflow kubeadm join bootstraps a Kubernetes worker node or a control-plane node and adds it to the cluster. This action consists of the following steps for worker nodes: kubeadm downloads necessary cluster information from the API server. By default, it uses the bootstrap token and the CA key hash to verify the authenticity of that data. The root CA can also be discovered directly via a file or URL. Once the cluster information is known, kubelet can start the TLS bootstrapping process.1. 2
5,820
The TLS bootstrap uses the shared token to temporarily authenticate with the Kubernetes API server to submit a certificate signing request (CSR); by default the control plane signs this CSR request automatically. Finally, kubeadm configures the local kubelet to connect to the API server with the definitive identity assigned to the node. For control-plane nodes additional steps are performed: Downloading certificates shared among control-plane nodes from the cluster (if explicitly requested by the user). Generating control-plane component manifests, certificates and kubeconfig. Adding new local etcd member. Using join phases with kubeadm Kubeadm allows you join a node to the cluster in phases using kubeadm join phase . To view the ordered list of phases and sub-phases you can call kubeadm join --help . The list will be located at the top of the help screen and each phase will have a description next to it. Note that by calling kubeadm join all of the phases and sub-phases will be execu
5,821
ted in this exact order. Some phases have unique flags, so if you want to have a look at the list of available options add --help , for example: kubeadm join phase kubelet-start --help Similar to the kubeadm init phase command, kubeadm join phase allows you to skip a list of phases using the --skip-phases flag. For example: sudo kubeadm join --skip-phases =preflight --config =config.yaml FEATURE STATE: Kubernetes v1.22 [beta] Alternatively, you can use the skipPhases field in JoinConfiguration . Discovering what cluster CA to trust The kubeadm discovery has several options, each with security tradeoffs. The right method for your environment depends on how you provision nodes and the security expectations you have about your network and node lifecycles. Token-based discovery with CA pinning This is the default mode in kubeadm. In this mode, kubeadm downloads the cluster configuration (including root CA) and validates it using the token as well as validating that the root CA public
5,822
key matches the provided hash and that the API server certificate is valid under the root CA.3. 1. 2. 3
5,823
The CA key hash has the format sha256:<hex_encoded_hash> . By default, the hash value is printed at the end of the kubeadm init command or in the output from the kubeadm token create --print-join-command command. It is in a standard format (see RFC7469 ) and can also be calculated by 3rd party tools or provisioning systems. For example, using the OpenSSL CLI: openssl x509 -pubkey -in /etc/kubernetes/pki/ca.crt | openssl rsa -pubin -outform der 2>/dev/ null | openssl dgst -sha256 -hex | sed 's/^.* //' Example kubeadm join commands: For worker nodes: kubeadm join --discovery-token abcdef.1234567890abcdef --discovery-token-ca-cert-hash sha256:1234..cdef 1.2.3.4:6443 For control-plane nodes: kubeadm join --discovery-token abcdef.1234567890abcdef --discovery-token-ca-cert-hash sha256:1234..cdef --control-plane 1.2.3.4:6443 You can also call join for a control-plane node with --certificate-key to copy certificates to this node, if the kubeadm init command was called with --upload-cer
5,824
ts . Advantages: Allows bootstrapping nodes to securely discover a root of trust for the control-plane node even if other worker nodes or the network are compromised. Convenient to execute manually since all of the information required fits into a single kubeadm join command. Disadvantages: The CA hash is not normally known until the control-plane node has been provisioned, which can make it more difficult to build automated provisioning tools that use kubeadm. By generating your CA in beforehand, you may workaround this limitation. Token-based discovery without CA pinning This mode relies only on the symmetric token to sign (HMAC-SHA256) the discovery information that establishes the root of trust for the control-plane. To use the mode the joining nodes must skip the hash validation of the CA public key, using --discovery-token-unsafe-skip- ca-verification . You should consider using one of the other modes if possible. Example kubeadm join command: kubeadm join --token abcdef.12345
5,825
67890abcdef --discovery-token-unsafe-skip-ca-verification 1.2.3.4:6443 Advantages: Still protects against many network-level attacks.• • •
5,826
The token can be generated ahead of time and shared with the control-plane node and worker nodes, which can then bootstrap in parallel without coordination. This allows it to be used in many provisioning scenarios. Disadvantages: If an attacker is able to steal a bootstrap token via some vulnerability, they can use that token (along with network-level access) to impersonate the control-plane node to other bootstrapping nodes. This may or may not be an appropriate tradeoff in your environment. File or HTTPS-based discovery This provides an out-of-band way to establish a root of trust between the control-plane node and bootstrapping nodes. Consider using this mode if you are building automated provisioning using kubeadm. The format of the discovery file is a regular Kubernetes kubeconfig file. In case the discovery file does not contain credentials, the TLS discovery token will be used. Example kubeadm join commands: kubeadm join --discovery-file path/to/file.conf (local file) kubeadm
5,827
join --discovery-file https://url/file.conf (remote HTTPS URL) Advantages: Allows bootstrapping nodes to securely discover a root of trust for the control-plane node even if the network or other worker nodes are compromised. Disadvantages: Requires that you have some way to carry the discovery information from the control- plane node to the bootstrapping nodes. If the discovery file contains credentials you must keep it secret and transfer it over a secure channel. This might be possible with your cloud provider or provisioning tool. Use of custom kubelet credentials with kubeadm join To allow kubeadm join to use predefined kubelet credentials and skip client TLS bootstrap and CSR approval for a new node: From a working control plane node in the cluster that has /etc/kubernetes/pki/ca.key execute kubeadm kubeconfig user --org system:nodes --client-name system:node:$NODE > kubelet.conf . $NODE must be set to the name of the new node. Modify the resulted kubelet.conf manually to ad
5,828
just the cluster name and the server endpoint, or run kubeadm kubeconfig user --config (it accepts InitConfiguration ). If your cluster does not have the ca.key file, you must sign the embedded certificates in the kubelet.conf externally. Copy the resulting kubelet.conf to /etc/kubernetes/kubelet.conf on the new node. Execute kubeadm join with the flag --ignore-preflight-errors=FileAvailable--etc- kubernetes-kubelet.conf on the new node.• • • • • • 1. 2. 1. 2
5,829
Securing your installation even more The defaults for kubeadm may not work for everyone. This section documents how to tighten up a kubeadm installation at the cost of some usability. Turning off auto-approval of node client certificates By default, there is a CSR auto-approver enabled that basically approves any client certificate request for a kubelet when a Bootstrap Token was used when authenticating. If you don't want the cluster to automatically approve kubelet client certs, you can turn it off by executing this command: kubectl delete clusterrolebinding kubeadm:node-autoapprove-bootstrap After that, kubeadm join will block until the admin has manually approved the CSR in flight: Using kubectl get csr , you can see that the original CSR is in the Pending state. kubectl get csr The output is similar to this: NAME AGE REQUESTOR CONDITION node-csr-c69HXe7aYcqkS1bKmH4faEnHAWxn6i2bHZ2mD04jZyQ 18s system:
5,830
bootstrap:878f07 Pending kubectl certificate approve allows the admin to approve CSR.This action tells a certificate signing controller to issue a certificate to the requestor with the attributes requested in the CSR. kubectl certificate approve node-csr- c69HXe7aYcqkS1bKmH4faEnHAWxn6i2bHZ2mD04jZyQ The output is similar to this: certificatesigningrequest "node-csr- c69HXe7aYcqkS1bKmH4faEnHAWxn6i2bHZ2mD04jZyQ" approved This would change the CRS resource to Active state. kubectl get csr The output is similar to this: NAME AGE REQUESTOR CONDITION node-csr-c69HXe7aYcqkS1bKmH4faEnHAWxn6i2bHZ2mD04jZyQ 1m system:bootstrap:878f07 Approved,Issued This forces the workflow that kubeadm join will only succeed if kubectl certificate approve has been run.1. 2. 3
5,831
Turning off public access to the cluster-info ConfigMap In order to achieve the joining flow using the token as the only piece of validation information, a ConfigMap with some data needed for validation of the control-plane node's identity is exposed publicly by default. While there is no private data in this ConfigMap, some users might wish to turn it off regardless. Doing so will disable the ability to use the --discovery-token flag of the kubeadm join flow. Here are the steps to do so: Fetch the cluster-info file from the API Server: kubectl -n kube-public get cm cluster-info -o jsonpath ='{.data.kubeconfig}' | tee cluster- info.yaml The output is similar to this: apiVersion : v1 kind: Config clusters : - cluster : certificate-authority-data : <ca-cert> server : https://<ip>:<port> name : "" contexts : [] current-context : "" preferences : {} users : [] Use the cluster-info.yaml file as an argument to kubeadm join --discovery-file . Turn off public access to the clus
5,832
ter-info ConfigMap: kubectl -n kube-public delete rolebinding kubeadm:bootstrap-signer-clusterinfo These commands should be run after kubeadm init but before kubeadm join . Using kubeadm join with a configuration file Caution: The config file is still considered beta and may change in future versions. It's possible to configure kubeadm join with a configuration file instead of command line flags, and some more advanced features may only be available as configuration file options. This file is passed using the --config flag and it must contain a JoinConfiguration structure. Mixing -- config with others flags may not be allowed in some cases. The default configuration can be printed out using the kubeadm config print command. If your configuration is not using the latest version it is recommended that you migrate using the kubeadm config migrate command. For more information on the fields and usage of the configuration you can navigate to our API reference .• •
5,833
What's next kubeadm init to bootstrap a Kubernetes control-plane node. kubeadm token to manage tokens for kubeadm join . kubeadm reset to revert any changes made to this host by kubeadm init or kubeadm join . kubeadm upgrade kubeadm upgrade is a user-friendly command that wraps complex upgrading logic behind one command, with support for both planning an upgrade and actually performing it. kubeadm upgrade guidance The steps for performing an upgrade using kubeadm are outlined in this document . For older versions of kubeadm, please refer to older documentation sets of the Kubernetes website. You can use kubeadm upgrade diff to see the changes that would be applied to static pod manifests. In Kubernetes v1.15.0 and later, kubeadm upgrade apply and kubeadm upgrade node will also automatically renew the kubeadm managed certificates on this node, including those stored in kubeconfig files. To opt-out, it is possible to pass the flag --certificate-renewal=false . For more details ab
5,834
out certificate renewal see the certificate management documentation . Note: The commands kubeadm upgrade apply and kubeadm upgrade plan have a legacy -- config flag which makes it possible to reconfigure the cluster, while performing planning or upgrade of that particular control-plane node. Please be aware that the upgrade workflow was not designed for this scenario and there are reports of unexpected results. kubeadm upgrade plan Check which versions are available to upgrade to and validate whether your current cluster is upgradeable. To skip the internet check, pass in the optional [version] parameter Synopsis Check which versions are available to upgrade to and validate whether your current cluster is upgradeable. To skip the internet check, pass in the optional [version] parameter kubeadm upgrade plan [version] [flags] Options --allow-experimental-upgrades Show unstable versions of Kubernetes as an upgrade alternative and allow upgrading to an alpha/beta/release candidate ver
5,835
sions of Kubernetes. --allow-release-candidate-upgrades• •
5,836
Show release candidate versions of Kubernetes as an upgrade alternative and allow upgrading to a release candidate versions of Kubernetes. --config string Path to a kubeadm configuration file. --feature-gates string A set of key=value pairs that describe feature gates for various features. Options are: EtcdLearnerMode=true|false (BETA - default=true) PublicKeysECDSA=true|false (DEPRECATED - default=false) RootlessControlPlane=true|false (ALPHA - default=false) UpgradeAddonsBeforeControlPlane=true|false (DEPRECATED - default=false) -h, --help help for plan --ignore-preflight-errors strings A list of checks whose errors will be shown as warnings. Example: 'IsPrivilegedUser,Swap'. Value 'all' ignores errors from all checks. --kubeconfig string     Default: "/etc/kubernetes/admin.conf" The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file. -o, --output string     Default: "text" EXPERIMENT
5,837
AL: Output format. One of: text|json|yaml. --print-config Specifies whether the configuration file that will be used in the upgrade should be printed or not. --show-managed-fields If true, keep the managedFields when printing objects in JSON or YAML format. Options inherited from parent commands --rootfs string [EXPERIMENTAL] The path to the 'real' host root filesystem
5,838
kubeadm upgrade apply Upgrade your Kubernetes cluster to the specified version Synopsis Upgrade your Kubernetes cluster to the specified version kubeadm upgrade apply [version] Options --allow-experimental-upgrades Show unstable versions of Kubernetes as an upgrade alternative and allow upgrading to an alpha/beta/release candidate versions of Kubernetes. --allow-release-candidate-upgrades Show release candidate versions of Kubernetes as an upgrade alternative and allow upgrading to a release candidate versions of Kubernetes. --certificate-renewal     Default: true Perform the renewal of certificates used by component changed during upgrades. --config string Path to a kubeadm configuration file. --dry-run Do not change any state, just output what actions would be performed. --etcd-upgrade     Default: true Perform the upgrade of etcd. --feature-gates string A set of key=value pairs that describe feature gates for various features. Options are: EtcdLearnerMode=true|false (BETA - default=
5,839
true) PublicKeysECDSA=true|false (DEPRECATED - default=false) RootlessControlPlane=true|false (ALPHA - default=false) UpgradeAddonsBeforeControlPlane=true|false (DEPRECATED - default=false) -f, --force Force upgrading although some requirements might not be met. This also implies non- interactive mode
5,840
-h, --help help for apply --ignore-preflight-errors strings A list of checks whose errors will be shown as warnings. Example: 'IsPrivilegedUser,Swap'. Value 'all' ignores errors from all checks. --kubeconfig string     Default: "/etc/kubernetes/admin.conf" The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file. --patches string 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". "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-numer
5,841
ically. --print-config Specifies whether the configuration file that will be used in the upgrade should be printed or not. -y, --yes Perform the upgrade and do not prompt for confirmation (non-interactive mode). Options inherited from parent commands --rootfs string [EXPERIMENTAL] The path to the 'real' host root filesystem. kubeadm upgrade diff Show what differences would be applied to existing static pod manifests. See also: kubeadm upgrade apply --dry-run Synopsis Show what differences would be applied to existing static pod manifests. See also: kubeadm upgrade apply --dry-ru
5,842
kubeadm upgrade diff [version] [flags] Options --api-server-manifest string     Default: "/etc/kubernetes/manifests/kube-apiserver.yaml" path to API server manifest --config string Path to a kubeadm configuration file. -c, --context-lines int     Default: 3 How many lines of context in the diff --controller-manager-manifest string     Default: "/etc/kubernetes/manifests/kube-controller- manager.yaml" path to controller manifest -h, --help help for diff --kubeconfig string     Default: "/etc/kubernetes/admin.conf" The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file. --scheduler-manifest string     Default: "/etc/kubernetes/manifests/kube-scheduler.yaml" path to scheduler manifest Options inherited from parent commands --rootfs string [EXPERIMENTAL] The path to the 'real' host root filesystem. kubeadm upgrade node Upgrade commands for a node in the cluster Synopsis Upgrade commands for
5,843
a node in the cluster The "node" command executes the following phases
5,844
preflight Run upgrade node pre-flight checks control-plane Upgrade the control plane instance deployed on this node, if any kubelet-config Upgrade the kubelet configuration for this node kubeadm upgrade node [flags] Options --certificate-renewal     Default: true Perform the renewal of certificates used by component changed during upgrades. --dry-run Do not change any state, just output the actions that would be performed. --etcd-upgrade     Default: true Perform the upgrade of etcd. -h, --help help for node --ignore-preflight-errors strings A list of checks whose errors will be shown as warnings. Example: 'IsPrivilegedUser,Swap'. Value 'all' ignores errors from all checks. --kubeconfig string     Default: "/etc/kubernetes/admin.conf" The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file. --patches string Path to a directory that contains files named "target[suffix][+patchtype
5,845
].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". "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 strings List of phases to be skipped Options inherited from parent commands --rootfs strin
5,846
[EXPERIMENTAL] The path to the 'real' host root filesystem. What's next kubeadm config if you initialized your cluster using kubeadm v1.7.x or lower, to configure your cluster for kubeadm upgrade kubeadm config During kubeadm init , kubeadm uploads the ClusterConfiguration object to your cluster in a ConfigMap called kubeadm-config in the kube-system namespace. This configuration is then read during kubeadm join , kubeadm reset and kubeadm upgrade . You can use kubeadm config print to print the default static configuration that kubeadm uses for kubeadm init and kubeadm join . Note: The output of the command is meant to serve as an example. You must manually edit the output of this command to adapt to your setup. Remove the fields that you are not certain about and kubeadm will try to default them on runtime by examining the host. For more information on init and join navigate to Using kubeadm init with a configuration file or Using kubeadm join with a configuration file . For m
5,847
ore information on using the kubeadm configuration API navigate to Customizing components with the kubeadm API . You can use kubeadm config migrate to convert your old configuration files that contain a deprecated API version to a newer, supported API version. kubeadm config validate can be used for validating a configuration file. kubeadm config images list and kubeadm config images pull can be used to list and pull the images that kubeadm requires. kubeadm config print Print configuration Synopsis This command prints configurations for subcommands provided. For details, see: https:// pkg.go.dev/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm#section-directories kubeadm config print [flags] Options -h, --help
5,848
help for print Options inherited from parent commands --kubeconfig string     Default: "/etc/kubernetes/admin.conf" The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file. --rootfs string [EXPERIMENTAL] The path to the 'real' host root filesystem. kubeadm config print init-defaults Print default init configuration, that can be used for 'kubeadm init' Synopsis This command prints objects such as the default init configuration that is used for 'kubeadm init'. Note that sensitive values like the Bootstrap Token fields are replaced with placeholder values like "abcdef.0123456789abcdef" in order to pass validation but not perform the real computation for creating a token. kubeadm config print init-defaults [flags] Options --component-configs strings A comma-separated list for component config API objects to print the default values for. Available values: [KubeProxyConfiguration KubeletConfig
5,849
uration]. If this flag is not set, no component configs will be printed. -h, --help help for init-defaults Options inherited from parent commands --kubeconfig string     Default: "/etc/kubernetes/admin.conf" The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file
5,850
--rootfs string [EXPERIMENTAL] The path to the 'real' host root filesystem. kubeadm config print join-defaults Print default join configuration, that can be used for 'kubeadm join' Synopsis This command prints objects such as the default join configuration that is used for 'kubeadm join'. Note that sensitive values like the Bootstrap Token fields are replaced with placeholder values like "abcdef.0123456789abcdef" in order to pass validation but not perform the real computation for creating a token. kubeadm config print join-defaults [flags] Options -h, --help help for join-defaults Options inherited from parent commands --kubeconfig string     Default: "/etc/kubernetes/admin.conf" The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file. --rootfs string [EXPERIMENTAL] The path to the 'real' host root filesystem. kubeadm config migrate Read an older version of the kubeadm configuration API
5,851
types from a file, and output the similar config object for the newer versio
5,852
Synopsis This command lets you convert configuration objects of older versions to the latest supported version, locally in the CLI tool without ever touching anything in the cluster. In this version of kubeadm, the following API versions are supported: kubeadm.k8s.io/v1beta3 Further, kubeadm can only write out config of version "kubeadm.k8s.io/v1beta3", but read both types. So regardless of what version you pass to the --old-config parameter here, the API object will be read, deserialized, defaulted, converted, validated, and re-serialized when written to stdout or --new-config if specified. In other words, the output of this command is what kubeadm actually would read internally if you submitted this file to "kubeadm init" kubeadm config migrate [flags] Options --allow-experimental-api Allow migration to experimental, unreleased APIs. -h, --help help for migrate --new-config string Path to the resulting equivalent kubeadm config file using the new API version. Optional, if not specifi
5,853
ed output will be sent to STDOUT. --old-config string Path to the kubeadm config file that is using an old API version and should be converted. This flag is mandatory. Options inherited from parent commands --kubeconfig string     Default: "/etc/kubernetes/admin.conf" The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file. --rootfs string [EXPERIMENTAL] The path to the 'real' host root filesystem.
5,854
kubeadm config validate Read a file containing the kubeadm configuration API and report any validation problems Synopsis This command lets you validate a kubeadm configuration API file and report any warnings and errors. If there are no errors the exit status will be zero, otherwise it will be non-zero. Any unmarshalling problems such as unknown API fields will trigger errors. Unknown API versions and fields with invalid values will also trigger errors. Any other errors or warnings may be reported depending on contents of the input file. In this version of kubeadm, the following API versions are supported: kubeadm.k8s.io/v1beta3 kubeadm config validate [flags] Options --allow-experimental-api Allow validation of experimental, unreleased APIs. --config string Path to a kubeadm configuration file. -h, --help help for validate Options inherited from parent commands --kubeconfig string     Default: "/etc/kubernetes/admin.conf" The kubeconfig file to use when talking to the cluster. If the
5,855
flag is not set, a set of standard locations can be searched for an existing kubeconfig file. --rootfs string [EXPERIMENTAL] The path to the 'real' host root filesystem. kubeadm config images list Print a list of images kubeadm will use. The configuration file is used in case any images or image repositories are customized
5,856
Synopsis Print a list of images kubeadm will use. The configuration file is used in case any images or image repositories are customized kubeadm config images list [flags] Options --allow-missing-template-keys     Default: true If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. --config string Path to a kubeadm configuration file. -o, --experimental-output string     Default: "text" Output format. One of: text|json|yaml|go-template|go-template-file|template|templatefile| jsonpath|jsonpath-as-json|jsonpath-file. --feature-gates string A set of key=value pairs that describe feature gates for various features. Options are: EtcdLearnerMode=true|false (BETA - default=true) PublicKeysECDSA=true|false (DEPRECATED - default=false) RootlessControlPlane=true|false (ALPHA - default=false) UpgradeAddonsBeforeControlPlane=true|false (DEPRECATED - default=false) -h, --help help for list --image-repository st
5,857
ring     Default: "registry.k8s.io" Choose a container registry to pull control plane images from --kubernetes-version string     Default: "stable-1" Choose a specific Kubernetes version for the control plane. --show-managed-fields If true, keep the managedFields when printing objects in JSON or YAML format. Options inherited from parent commands --kubeconfig string     Default: "/etc/kubernetes/admin.conf
5,858
The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file. --rootfs string [EXPERIMENTAL] The path to the 'real' host root filesystem. kubeadm config images pull Pull images used by kubeadm Synopsis Pull images used by kubeadm kubeadm config images pull [flags] Options --config string Path to a kubeadm configuration file. --cri-socket string 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 non-standard CRI socket. --feature-gates string A set of key=value pairs that describe feature gates for various features. Options are: EtcdLearnerMode=true|false (BETA - default=true) PublicKeysECDSA=true|false (DEPRECATED - default=false) RootlessControlPlane=true|false (ALPHA - default=false) UpgradeAddonsBeforeControlPlane=true|false (DEPRECATED - default=false) -h, --help help for pull
5,859
--image-repository string     Default: "registry.k8s.io" Choose a container registry to pull control plane images from --kubernetes-version string     Default: "stable-1" Choose a specific Kubernetes version for the control plane
5,860
Options inherited from parent commands --kubeconfig string     Default: "/etc/kubernetes/admin.conf" The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file. --rootfs string [EXPERIMENTAL] The path to the 'real' host root filesystem. What's next kubeadm upgrade to upgrade a Kubernetes cluster to a newer version kubeadm reset Performs a best effort revert of changes made by kubeadm init or kubeadm join . Performs a best effort revert of changes made to this host by 'kubeadm init' or 'kubeadm join' Synopsis Performs a best effort revert of changes made to this host by 'kubeadm init' or 'kubeadm join' The "reset" command executes the following phases: preflight Run reset pre-flight checks remove-etcd-member Remove a local etcd member. cleanup-node Run cleanup node. kubeadm reset [flags] Options --cert-dir string     Default: "/etc/kubernetes/pki" The path to the director
5,861
y where the certificates are stored. If specified, clean this directory. --cleanup-tmp-dir Cleanup the "/etc/kubernetes/tmp" directory --config string Path to a kubeadm configuration file. --cri-socket string
5,862
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 non-standard CRI socket. --dry-run Don't apply any changes; just output what would be done. -f, --force Reset the node without prompting for confirmation. -h, --help help for reset --ignore-preflight-errors strings A list of checks whose errors will be shown as warnings. Example: 'IsPrivilegedUser,Swap'. Value 'all' ignores errors from all checks. --kubeconfig string     Default: "/etc/kubernetes/admin.conf" The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file. --skip-phases strings List of phases to be skipped Options inherited from parent commands --rootfs string [EXPERIMENTAL] The path to the 'real' host root filesystem. Reset workflow kubeadm reset is responsible for cleaning up a node local file system from files that
5,863
were created using the kubeadm init or kubeadm join commands. For control-plane nodes reset also removes the local stacked etcd member of this node from the etcd cluster. kubeadm reset phase can be used to execute the separate phases of the above workflow. To skip a list of phases you can use the --skip-phases flag, which works in a similar way to the kubeadm join and kubeadm init phase runners. External etcd clean up kubeadm reset will not delete any etcd data if external etcd is used. This means that if you run kubeadm init again using the same etcd endpoints, you will see state from previous clusters
5,864
To wipe etcd data it is recommended you use a client like etcdctl, such as: etcdctl del "" --prefix See the etcd documentation for more information. Graceful kube-apiserver shutdown If you have your kube-apiserver configured with the --shutdown-delay-duration flag, you can run the following commands to attempt a graceful shutdown for the running API server Pod, before you run kubeadm reset : yq eval -i '.spec.containers[0].command = []' /etc/kubernetes/manifests/kube-apiserver.yaml timeout 60 sh -c 'while pgrep kube-apiserver >/dev/null; do sleep 1; done' || true What's next kubeadm init to bootstrap a Kubernetes control-plane node kubeadm join to bootstrap a Kubernetes worker node and join it to the cluster kubeadm token Bootstrap tokens are used for establishing bidirectional trust between a node joining the cluster and a control-plane node, as described in authenticating with bootstrap tokens . kubeadm init creates an initial token with a 24-hour TTL. The following commands
5,865
allow you to manage such a token and also to create and manage new ones. kubeadm token create Create bootstrap tokens on the server Synopsis This command will create a bootstrap token for you. You can specify the usages for this token, the "time to live" and an optional human friendly description. The [token] is the actual token to write. This should be a securely generated random token of the form "[a-z0-9]{6}.[a-z0-9]{16}". If no [token] is given, kubeadm will generate a random token instead. kubeadm token create [token] Options --certificate-key string•
5,866
When used together with '--print-join-command', print the full 'kubeadm join' flag needed to join the cluster as a control-plane. To create a new certificate key you must use 'kubeadm init phase upload-certs --upload-certs'. --config string Path to a kubeadm configuration file. --description string A human friendly description of how this token is used. --groups strings     Default: "system:bootstrappers:kubeadm:default-node-token" Extra groups that this token will authenticate as when used for authentication. Must match "\Asystem:bootstrappers:[a-z0-9:-]{0,255}[a-z0-9]\z" -h, --help help for create --print-join-command Instead of printing only the token, print the full 'kubeadm join' flag needed to join the cluster using the token. --ttl duration     Default: 24h0m0s The duration before the token is automatically deleted (e.g. 1s, 2m, 3h). If set to '0', the token will never expire --usages strings     Default: "signing,authentication" Describes the ways in which this token can be use
5,867
d. You can pass --usages multiple times or provide a comma separated list of options. Valid options: [signing,authentication] Options inherited from parent commands --dry-run Whether to enable dry-run mode or not --kubeconfig string     Default: "/etc/kubernetes/admin.conf" The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file. --rootfs strin
5,868
[EXPERIMENTAL] The path to the 'real' host root filesystem. kubeadm token delete Delete bootstrap tokens on the server Synopsis This command will delete a list of bootstrap tokens for you. The [token-value] is the full Token of the form "[a-z0-9]{6}.[a-z0-9]{16}" or the Token ID of the form "[a-z0-9]{6}" to delete. kubeadm token delete [token-value] ... Options -h, --help help for delete Options inherited from parent commands --dry-run Whether to enable dry-run mode or not --kubeconfig string     Default: "/etc/kubernetes/admin.conf" The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file. --rootfs string [EXPERIMENTAL] The path to the 'real' host root filesystem. kubeadm token generate Generate and print a bootstrap token, but do not create it on the server Synopsis This command will print out a randomly-generated bootstrap token that can be used with the "init" and "join" commands.
5,869
You don't have to use this command in order to generate a token. You can do so yourself as long as it is in the format "[a-z0-9]{6}.[a-z0-9]{16}". This command is provided for convenience to generate tokens in the given format. You can also use "kubeadm init" without specifying a token and it will generate and print one for you. kubeadm token generate [flags] Options -h, --help help for generate Options inherited from parent commands --dry-run Whether to enable dry-run mode or not --kubeconfig string     Default: "/etc/kubernetes/admin.conf" The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file. --rootfs string [EXPERIMENTAL] The path to the 'real' host root filesystem. kubeadm token list List bootstrap tokens on the server Synopsis This command will list all bootstrap tokens for you. kubeadm token list [flags] Options --allow-missing-template-keys     Default: true If true, ignore any
5,870
errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. -o, --experimental-output string     Default: "text
5,871
Output format. One of: text|json|yaml|go-template|go-template-file|template|templatefile| jsonpath|jsonpath-as-json|jsonpath-file. -h, --help help for list --show-managed-fields If true, keep the managedFields when printing objects in JSON or YAML format. Options inherited from parent commands --dry-run Whether to enable dry-run mode or not --kubeconfig string     Default: "/etc/kubernetes/admin.conf" The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file. --rootfs string [EXPERIMENTAL] The path to the 'real' host root filesystem. What's next kubeadm join to bootstrap a Kubernetes worker node and join it to the cluster kubeadm version This command prints the version of kubeadm. Print the version of kubeadm Synopsis Print the version of kubeadm kubeadm version [flags] Options -h, --help•
5,872
help for version -o, --output string Output format; available options are 'yaml', 'json' and 'short' Options inherited from parent commands --rootfs string [EXPERIMENTAL] The path to the 'real' host root filesystem. kubeadm alpha Caution: kubeadm alpha provides a preview of a set of features made available for gathering feedback from the community. Please try it out and give us feedback! Currently there are no experimental commands under kubeadm alpha . What's next kubeadm init to bootstrap a Kubernetes control-plane node kubeadm join to connect a node to the cluster kubeadm reset to revert any changes made to this host by kubeadm init or kubeadm join kubeadm certs kubeadm certs provides utilities for managing certificates. For more details on how these commands can be used, see Certificate Management with kubeadm . kubeadm certs A collection of operations for operating Kubernetes certificates. overview Commands related to handling kubernetes certificates Synopsis Commands relat
5,873
ed to handling kubernetes certificates kubeadm certs [flags]• • •
5,874
Options -h, --help help for certs Options inherited from parent commands --rootfs string [EXPERIMENTAL] The path to the 'real' host root filesystem. kubeadm certs renew You can renew all Kubernetes certificates using the all subcommand or renew them selectively. For more details see Manual certificate renewal . renew all admin.conf apiserver-etcd-client apiserver-kubelet-client apiserver controller-manager.conf etcd-healthcheck-client etcd-peer etcd-server front-proxy-client scheduler.conf super-admin.conf Renew certificates for a Kubernetes cluster Synopsis This command is not meant to be run on its own. See list of available subcommands. kubeadm certs renew [flags] Options -h, --help help for renew Options inherited from parent commands --rootfs string• • • • • • • • • • • • •
5,875
[EXPERIMENTAL] The path to the 'real' host root filesystem. Renew all available certificates Synopsis Renew all known certificates necessary to run the control plane. Renewals are run unconditionally, regardless of expiration date. Renewals can also be run individually for more control. kubeadm certs renew all [flags] Options --cert-dir string     Default: "/etc/kubernetes/pki" The path where to save the certificates --config string Path to a kubeadm configuration file. -h, --help help for all --kubeconfig string     Default: "/etc/kubernetes/admin.conf" The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file. Options inherited from parent commands --rootfs string [EXPERIMENTAL] The path to the 'real' host root filesystem. Renew the certificate embedded in the kubeconfig file for the admin to use and for kubeadm itself Synopsis Renew the certificate embedded in the kubeconfig file for th
5,876
e admin to use and for kubeadm itself. Renewals run unconditionally, regardless of certificate expiration date; extra attributes such as SANs will be based on the existing file/certificates, there is no need to resupply them
5,877
Renewal by default tries to use the certificate authority in the local PKI managed by kubeadm; as alternative it is possible to use K8s certificate API for certificate renewal, or as a last option, to generate a CSR request. After renewal, in order to make changes effective, is required to restart control-plane components and eventually re-distribute the renewed certificate in case the file is used elsewhere. kubeadm certs renew admin.conf [flags] Options --cert-dir string     Default: "/etc/kubernetes/pki" The path where to save the certificates --config string Path to a kubeadm configuration file. -h, --help help for admin.conf --kubeconfig string     Default: "/etc/kubernetes/admin.conf" The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file. Options inherited from parent commands --rootfs string [EXPERIMENTAL] The path to the 'real' host root filesystem. Renew the certificate the ap
5,878
iserver uses to access etcd Synopsis Renew the certificate the apiserver uses to access etcd. Renewals run unconditionally, regardless of certificate expiration date; extra attributes such as SANs will be based on the existing file/certificates, there is no need to resupply them. Renewal by default tries to use the certificate authority in the local PKI managed by kubeadm; as alternative it is possible to use K8s certificate API for certificate renewal, or as a last option, to generate a CSR request
5,879
After renewal, in order to make changes effective, is required to restart control-plane components and eventually re-distribute the renewed certificate in case the file is used elsewhere. kubeadm certs renew apiserver-etcd-client [flags] Options --cert-dir string     Default: "/etc/kubernetes/pki" The path where to save the certificates --config string Path to a kubeadm configuration file. -h, --help help for apiserver-etcd-client --kubeconfig string     Default: "/etc/kubernetes/admin.conf" The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file. Options inherited from parent commands --rootfs string [EXPERIMENTAL] The path to the 'real' host root filesystem. Renew the certificate for the API server to connect to kubelet Synopsis Renew the certificate for the API server to connect to kubelet. Renewals run unconditionally, regardless of certificate expiration date; extra attributes such
5,880
as SANs will be based on the existing file/certificates, there is no need to resupply them. Renewal by default tries to use the certificate authority in the local PKI managed by kubeadm; as alternative it is possible to use K8s certificate API for certificate renewal, or as a last option, to generate a CSR request. After renewal, in order to make changes effective, is required to restart control-plane components and eventually re-distribute the renewed certificate in case the file is used elsewhere. kubeadm certs renew apiserver-kubelet-client [flags
5,881
Options --cert-dir string     Default: "/etc/kubernetes/pki" The path where to save the certificates --config string Path to a kubeadm configuration file. -h, --help help for apiserver-kubelet-client --kubeconfig string     Default: "/etc/kubernetes/admin.conf" The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file. Options inherited from parent commands --rootfs string [EXPERIMENTAL] The path to the 'real' host root filesystem. Renew the certificate for serving the Kubernetes API Synopsis Renew the certificate for serving the Kubernetes API. Renewals run unconditionally, regardless of certificate expiration date; extra attributes such as SANs will be based on the existing file/certificates, there is no need to resupply them. Renewal by default tries to use the certificate authority in the local PKI managed by kubeadm; as alternative it is possible to use K8s certificate API for certifi
5,882
cate renewal, or as a last option, to generate a CSR request. After renewal, in order to make changes effective, is required to restart control-plane components and eventually re-distribute the renewed certificate in case the file is used elsewhere. kubeadm certs renew apiserver [flags] Options --cert-dir string     Default: "/etc/kubernetes/pki" The path where to save the certificate
5,883
--config string Path to a kubeadm configuration file. -h, --help help for apiserver --kubeconfig string     Default: "/etc/kubernetes/admin.conf" The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file. Options inherited from parent commands --rootfs string [EXPERIMENTAL] The path to the 'real' host root filesystem. Renew the certificate embedded in the kubeconfig file for the controller manager to use Synopsis Renew the certificate embedded in the kubeconfig file for the controller manager to use. Renewals run unconditionally, regardless of certificate expiration date; extra attributes such as SANs will be based on the existing file/certificates, there is no need to resupply them. Renewal by default tries to use the certificate authority in the local PKI managed by kubeadm; as alternative it is possible to use K8s certificate API for certificate renewal, or as a last option, to generate
5,884
a CSR request. After renewal, in order to make changes effective, is required to restart control-plane components and eventually re-distribute the renewed certificate in case the file is used elsewhere. kubeadm certs renew controller-manager.conf [flags] Options --cert-dir string     Default: "/etc/kubernetes/pki" The path where to save the certificates --config string Path to a kubeadm configuration file. -h, --hel
5,885
help for controller-manager.conf --kubeconfig string     Default: "/etc/kubernetes/admin.conf" The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file. Options inherited from parent commands --rootfs string [EXPERIMENTAL] The path to the 'real' host root filesystem. Renew the certificate for liveness probes to healthcheck etcd Synopsis Renew the certificate for liveness probes to healthcheck etcd. Renewals run unconditionally, regardless of certificate expiration date; extra attributes such as SANs will be based on the existing file/certificates, there is no need to resupply them. Renewal by default tries to use the certificate authority in the local PKI managed by kubeadm; as alternative it is possible to use K8s certificate API for certificate renewal, or as a last option, to generate a CSR request. After renewal, in order to make changes effective, is required to restart control-plane
5,886
components and eventually re-distribute the renewed certificate in case the file is used elsewhere. kubeadm certs renew etcd-healthcheck-client [flags] Options --cert-dir string     Default: "/etc/kubernetes/pki" The path where to save the certificates --config string Path to a kubeadm configuration file. -h, --help help for etcd-healthcheck-client --kubeconfig string     Default: "/etc/kubernetes/admin.conf
5,887
The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file. Options inherited from parent commands --rootfs string [EXPERIMENTAL] The path to the 'real' host root filesystem. Renew the certificate for etcd nodes to communicate with each other Synopsis Renew the certificate for etcd nodes to communicate with each other. Renewals run unconditionally, regardless of certificate expiration date; extra attributes such as SANs will be based on the existing file/certificates, there is no need to resupply them. Renewal by default tries to use the certificate authority in the local PKI managed by kubeadm; as alternative it is possible to use K8s certificate API for certificate renewal, or as a last option, to generate a CSR request. After renewal, in order to make changes effective, is required to restart control-plane components and eventually re-distribute the renewed certificate in case the file i
5,888
s used elsewhere. kubeadm certs renew etcd-peer [flags] Options --cert-dir string     Default: "/etc/kubernetes/pki" The path where to save the certificates --config string Path to a kubeadm configuration file. -h, --help help for etcd-peer --kubeconfig string     Default: "/etc/kubernetes/admin.conf" The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file
5,889
Options inherited from parent commands --rootfs string [EXPERIMENTAL] The path to the 'real' host root filesystem. Renew the certificate for serving etcd Synopsis Renew the certificate for serving etcd. Renewals run unconditionally, regardless of certificate expiration date; extra attributes such as SANs will be based on the existing file/certificates, there is no need to resupply them. Renewal by default tries to use the certificate authority in the local PKI managed by kubeadm; as alternative it is possible to use K8s certificate API for certificate renewal, or as a last option, to generate a CSR request. After renewal, in order to make changes effective, is required to restart control-plane components and eventually re-distribute the renewed certificate in case the file is used elsewhere. kubeadm certs renew etcd-server [flags] Options --cert-dir string     Default: "/etc/kubernetes/pki" The path where to save the certificates --config string Path to a kubeadm configuration file. -h
5,890
, --help help for etcd-server --kubeconfig string     Default: "/etc/kubernetes/admin.conf" The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file. Options inherited from parent commands --rootfs string [EXPERIMENTAL] The path to the 'real' host root filesystem
5,891
Renew the certificate for the front proxy client Synopsis Renew the certificate for the front proxy client. Renewals run unconditionally, regardless of certificate expiration date; extra attributes such as SANs will be based on the existing file/certificates, there is no need to resupply them. Renewal by default tries to use the certificate authority in the local PKI managed by kubeadm; as alternative it is possible to use K8s certificate API for certificate renewal, or as a last option, to generate a CSR request. After renewal, in order to make changes effective, is required to restart control-plane components and eventually re-distribute the renewed certificate in case the file is used elsewhere. kubeadm certs renew front-proxy-client [flags] Options --cert-dir string     Default: "/etc/kubernetes/pki" The path where to save the certificates --config string Path to a kubeadm configuration file. -h, --help help for front-proxy-client --kubeconfig string     Default: "/etc/kubernetes/a
5,892
dmin.conf" The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file. Options inherited from parent commands --rootfs string [EXPERIMENTAL] The path to the 'real' host root filesystem. Renew the certificate embedded in the kubeconfig file for the scheduler manager to use Synopsis Renew the certificate embedded in the kubeconfig file for the scheduler manager to use
5,893
Renewals run unconditionally, regardless of certificate expiration date; extra attributes such as SANs will be based on the existing file/certificates, there is no need to resupply them. Renewal by default tries to use the certificate authority in the local PKI managed by kubeadm; as alternative it is possible to use K8s certificate API for certificate renewal, or as a last option, to generate a CSR request. After renewal, in order to make changes effective, is required to restart control-plane components and eventually re-distribute the renewed certificate in case the file is used elsewhere. kubeadm certs renew scheduler.conf [flags] Options --cert-dir string     Default: "/etc/kubernetes/pki" The path where to save the certificates --config string Path to a kubeadm configuration file. -h, --help help for scheduler.conf --kubeconfig string     Default: "/etc/kubernetes/admin.conf" The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locatio
5,894
ns can be searched for an existing kubeconfig file. Options inherited from parent commands --rootfs string [EXPERIMENTAL] The path to the 'real' host root filesystem. Renew the certificate embedded in the kubeconfig file for the super-admin Synopsis Renew the certificate embedded in the kubeconfig file for the super-admin. Renewals run unconditionally, regardless of certificate expiration date; extra attributes such as SANs will be based on the existing file/certificates, there is no need to resupply them. Renewal by default tries to use the certificate authority in the local PKI managed by kubeadm; as alternative it is possible to use K8s certificate API for certificate renewal, or as a last option, to generate a CSR request
5,895
After renewal, in order to make changes effective, is required to restart control-plane components and eventually re-distribute the renewed certificate in case the file is used elsewhere. kubeadm certs renew super-admin.conf [flags] Options --cert-dir string     Default: "/etc/kubernetes/pki" The path where to save the certificates --config string Path to a kubeadm configuration file. -h, --help help for super-admin.conf --kubeconfig string     Default: "/etc/kubernetes/admin.conf" The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file. Options inherited from parent commands --rootfs string [EXPERIMENTAL] The path to the 'real' host root filesystem. kubeadm certs certificate-key This command can be used to generate a new control-plane certificate key. The key can be passed as --certificate-key to kubeadm init and kubeadm join to enable the automatic copy of certificates when joining
5,896
additional control-plane nodes. certificate-key Generate certificate keys Synopsis This command will print out a secure randomly-generated certificate key that can be used with the "init" command. You can also use "kubeadm init --upload-certs" without specifying a certificate key and it will generate and print one for you. kubeadm certs certificate-key [flags]
5,897
Options -h, --help help for certificate-key Options inherited from parent commands --rootfs string [EXPERIMENTAL] The path to the 'real' host root filesystem. kubeadm certs check-expiration This command checks expiration for the certificates in the local PKI managed by kubeadm. For more details see Check certificate expiration . check-expiration Check certificates expiration for a Kubernetes cluster Synopsis Checks expiration for the certificates in the local PKI managed by kubeadm. kubeadm certs check-expiration [flags] Options --cert-dir string     Default: "/etc/kubernetes/pki" The path where to save the certificates --config string Path to a kubeadm configuration file. -h, --help help for check-expiration --kubeconfig string     Default: "/etc/kubernetes/admin.conf" The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file.•
5,898
Options inherited from parent commands --rootfs string [EXPERIMENTAL] The path to the 'real' host root filesystem. kubeadm certs generate-csr This command can be used to generate keys and CSRs for all control-plane certificates and kubeconfig files. The user can then sign the CSRs with a CA of their choice. To read more information on how to use the command see Signing certificate signing requests (CSR) generated by kubeadm . generate-csr Generate keys and certificate signing requests Synopsis Generates keys and certificate signing requests (CSRs) for all the certificates required to run the control plane. This command also generates partial kubeconfig files with private key data in the "users > user > client-key-data" field, and for each kubeconfig file an accompanying ".csr" file is created. This command is designed for use in Kubeadm External CA Mode . It generates CSRs which you can then submit to your external certificate authority for signing. The PEM encoded signed certificates
5,899