kubeadm init phase
enables you to invoke atomic steps of the bootstrap process. Hence, you can let kubeadm do some of the work and you can fill in the gaps if you wish to apply customization.
kubeadm init phase
is consistent with the kubeadm init workflow, and behind the scene both use the same code.
Using this command you can execute preflight checks on a control-plane node.
Run pre-flight checks
Run pre-flight checks for kubeadm init.
kubeadm init phase preflight [flags]
# Run pre-flight checks for kubeadm init using a config file.
kubeadm init phase preflight --config kubeadm-config.yaml
--config string | |
Path to a kubeadm configuration file. | |
-h, --help | |
help for preflight | |
--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. |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
This phase will write the kubelet configuration file and environment file and then start the kubelet.
Write kubelet settings and (re)start the kubelet
Write a file with KubeletConfiguration and an environment file with node specific kubelet settings, and then (re)start kubelet.
kubeadm init phase kubelet-start [flags]
# Writes a dynamic environment file with kubelet flags from a InitConfiguration file.
kubeadm init phase kubelet-start --config config.yaml
--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. | |
-h, --help | |
help for kubelet-start | |
--node-name string | |
Specify the node name. |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
Can be used to create all required certificates by kubeadm.
Certificate generation
This command is not meant to be run on its own. See list of available subcommands.
kubeadm init phase certs [flags]
-h, --help | |
help for certs |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
Generate all certificates
Generate all certificates
kubeadm init phase certs all [flags]
--apiserver-advertise-address string | |
The IP address the API Server will advertise it's listening on. If not set the default network interface will be used. | |
--apiserver-cert-extra-sans strings | |
Optional extra Subject Alternative Names (SANs) to use for the API Server serving certificate. Can be both IP addresses and DNS names. | |
--cert-dir string Default: "/etc/kubernetes/pki" | |
The path where to save and store the certificates. | |
--config string | |
Path to a kubeadm configuration file. | |
--control-plane-endpoint string | |
Specify a stable IP address or DNS name for the control plane. | |
-h, --help | |
help for all | |
--kubernetes-version string Default: "stable-1" | |
Choose a specific Kubernetes version for the control plane. | |
--service-cidr string Default: "10.96.0.0/12" | |
Use alternative range of IP address for service VIPs. | |
--service-dns-domain string Default: "cluster.local" | |
Use alternative domain for services, e.g. "myorg.internal". |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
Generate the self-signed Kubernetes CA to provision identities for other Kubernetes components
Generate the self-signed Kubernetes CA to provision identities for other Kubernetes components, and save them into ca.crt and ca.key files.
If both files already exist, kubeadm skips the generation step and existing files will be used.
Alpha Disclaimer: this command is currently alpha.
kubeadm init phase certs ca [flags]
--cert-dir string Default: "/etc/kubernetes/pki" | |
The path where to save and store the certificates. | |
--config string | |
Path to a kubeadm configuration file. | |
-h, --help | |
help for ca | |
--kubernetes-version string Default: "stable-1" | |
Choose a specific Kubernetes version for the control plane. |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
Generate the certificate for serving the Kubernetes API
Generate the certificate for serving the Kubernetes API, and save them into apiserver.crt and apiserver.key files.
If both files already exist, kubeadm skips the generation step and existing files will be used.
Alpha Disclaimer: this command is currently alpha.
kubeadm init phase certs apiserver [flags]
--apiserver-advertise-address string | |
The IP address the API Server will advertise it's listening on. If not set the default network interface will be used. | |
--apiserver-cert-extra-sans strings | |
Optional extra Subject Alternative Names (SANs) to use for the API Server serving certificate. Can be both IP addresses and DNS names. | |
--cert-dir string Default: "/etc/kubernetes/pki" | |
The path where to save and store the certificates. | |
--config string | |
Path to a kubeadm configuration file. | |
--control-plane-endpoint string | |
Specify a stable IP address or DNS name for the control plane. | |
-h, --help | |
help for apiserver | |
--kubernetes-version string Default: "stable-1" | |
Choose a specific Kubernetes version for the control plane. | |
--service-cidr string Default: "10.96.0.0/12" | |
Use alternative range of IP address for service VIPs. | |
--service-dns-domain string Default: "cluster.local" | |
Use alternative domain for services, e.g. "myorg.internal". |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
Generate the certificate for the API server to connect to kubelet
Generate the certificate for the API server to connect to kubelet, and save them into apiserver-kubelet-client.crt and apiserver-kubelet-client.key files.
If both files already exist, kubeadm skips the generation step and existing files will be used.
Alpha Disclaimer: this command is currently alpha.
kubeadm init phase certs apiserver-kubelet-client [flags]
--cert-dir string Default: "/etc/kubernetes/pki" | |
The path where to save and store the certificates. | |
--config string | |
Path to a kubeadm configuration file. | |
-h, --help | |
help for apiserver-kubelet-client | |
--kubernetes-version string Default: "stable-1" | |
Choose a specific Kubernetes version for the control plane. |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
Generate the self-signed CA to provision identities for front proxy
Generate the self-signed CA to provision identities for front proxy, and save them into front-proxy-ca.crt and front-proxy-ca.key files.
If both files already exist, kubeadm skips the generation step and existing files will be used.
Alpha Disclaimer: this command is currently alpha.
kubeadm init phase certs front-proxy-ca [flags]
--cert-dir string Default: "/etc/kubernetes/pki" | |
The path where to save and store the certificates. | |
--config string | |
Path to a kubeadm configuration file. | |
-h, --help | |
help for front-proxy-ca | |
--kubernetes-version string Default: "stable-1" | |
Choose a specific Kubernetes version for the control plane. |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
Generate the certificate for the front proxy client
Generate the certificate for the front proxy client, and save them into front-proxy-client.crt and front-proxy-client.key files.
If both files already exist, kubeadm skips the generation step and existing files will be used.
Alpha Disclaimer: this command is currently alpha.
kubeadm init phase certs front-proxy-client [flags]
--cert-dir string Default: "/etc/kubernetes/pki" | |
The path where to save and store the certificates. | |
--config string | |
Path to a kubeadm configuration file. | |
-h, --help | |
help for front-proxy-client | |
--kubernetes-version string Default: "stable-1" | |
Choose a specific Kubernetes version for the control plane. |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
Generate the self-signed CA to provision identities for etcd
Generate the self-signed CA to provision identities for etcd, and save them into etcd/ca.crt and etcd/ca.key files.
If both files already exist, kubeadm skips the generation step and existing files will be used.
Alpha Disclaimer: this command is currently alpha.
kubeadm init phase certs etcd-ca [flags]
--cert-dir string Default: "/etc/kubernetes/pki" | |
The path where to save and store the certificates. | |
--config string | |
Path to a kubeadm configuration file. | |
-h, --help | |
help for etcd-ca | |
--kubernetes-version string Default: "stable-1" | |
Choose a specific Kubernetes version for the control plane. |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
Generate the certificate for serving etcd
Generate the certificate for serving etcd, and save them into etcd/server.crt and etcd/server.key files.
Default SANs are localhost, 127.0.0.1, 127.0.0.1, ::1
If both files already exist, kubeadm skips the generation step and existing files will be used.
Alpha Disclaimer: this command is currently alpha.
kubeadm init phase certs etcd-server [flags]
--cert-dir string Default: "/etc/kubernetes/pki" | |
The path where to save and store the certificates. | |
--config string | |
Path to a kubeadm configuration file. | |
-h, --help | |
help for etcd-server | |
--kubernetes-version string Default: "stable-1" | |
Choose a specific Kubernetes version for the control plane. |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
Generate the certificate for etcd nodes to communicate with each other
Generate the certificate for etcd nodes to communicate with each other, and save them into etcd/peer.crt and etcd/peer.key files.
Default SANs are localhost, 127.0.0.1, 127.0.0.1, ::1
If both files already exist, kubeadm skips the generation step and existing files will be used.
Alpha Disclaimer: this command is currently alpha.
kubeadm init phase certs etcd-peer [flags]
--cert-dir string Default: "/etc/kubernetes/pki" | |
The path where to save and store the certificates. | |
--config string | |
Path to a kubeadm configuration file. | |
-h, --help | |
help for etcd-peer | |
--kubernetes-version string Default: "stable-1" | |
Choose a specific Kubernetes version for the control plane. |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
Generate the certificate for liveness probes to healthcheck etcd
Generate the certificate for liveness probes to healthcheck etcd, and save them into etcd/healthcheck-client.crt and etcd/healthcheck-client.key files.
If both files already exist, kubeadm skips the generation step and existing files will be used.
Alpha Disclaimer: this command is currently alpha.
kubeadm init phase certs etcd-healthcheck-client [flags]
--cert-dir string Default: "/etc/kubernetes/pki" | |
The path where to save and store the certificates. | |
--config string | |
Path to a kubeadm configuration file. | |
-h, --help | |
help for etcd-healthcheck-client | |
--kubernetes-version string Default: "stable-1" | |
Choose a specific Kubernetes version for the control plane. |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
Generate the certificate the apiserver uses to access etcd
Generate the certificate the apiserver uses to access etcd, and save them into apiserver-etcd-client.crt and apiserver-etcd-client.key files.
If both files already exist, kubeadm skips the generation step and existing files will be used.
Alpha Disclaimer: this command is currently alpha.
kubeadm init phase certs apiserver-etcd-client [flags]
--cert-dir string Default: "/etc/kubernetes/pki" | |
The path where to save and store the certificates. | |
--config string | |
Path to a kubeadm configuration file. | |
-h, --help | |
help for apiserver-etcd-client | |
--kubernetes-version string Default: "stable-1" | |
Choose a specific Kubernetes version for the control plane. |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
Generate a private key for signing service account tokens along with its public key
Generate the private key for signing service account tokens along with its public key, and save them into sa.key and sa.pub files. If both files already exist, kubeadm skips the generation step and existing files will be used.
Alpha Disclaimer: this command is currently alpha.
kubeadm init phase certs sa [flags]
--cert-dir string Default: "/etc/kubernetes/pki" | |
The path where to save and store the certificates. | |
-h, --help | |
help for sa |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
You can create all required kubeconfig files by calling the all
subcommand or call them individually.
Generate all kubeconfig files necessary to establish the control plane and the admin kubeconfig file
This command is not meant to be run on its own. See list of available subcommands.
kubeadm init phase kubeconfig [flags]
-h, --help | |
help for kubeconfig |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
Generate all kubeconfig files
Generate all kubeconfig files
kubeadm init phase kubeconfig all [flags]
--apiserver-advertise-address string | |
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 int32 Default: 6443 | |
Port for the API Server to bind to. | |
--cert-dir string Default: "/etc/kubernetes/pki" | |
The path where to save and store the certificates. | |
--config string | |
Path to a kubeadm configuration file. | |
--control-plane-endpoint string | |
Specify a stable IP address or DNS name for the control plane. | |
-h, --help | |
help for all | |
--kubeconfig-dir string Default: "/etc/kubernetes" | |
The path where to save the kubeconfig file. | |
--kubernetes-version string Default: "stable-1" | |
Choose a specific Kubernetes version for the control plane. | |
--node-name string | |
Specify the node name. |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
Generate a kubeconfig file for the admin to use and for kubeadm itself
Generate the kubeconfig file for the admin and for kubeadm itself, and save it to admin.conf file.
kubeadm init phase kubeconfig admin [flags]
--apiserver-advertise-address string | |
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 int32 Default: 6443 | |
Port for the API Server to bind to. | |
--cert-dir string Default: "/etc/kubernetes/pki" | |
The path where to save and store the certificates. | |
--config string | |
Path to a kubeadm configuration file. | |
--control-plane-endpoint string | |
Specify a stable IP address or DNS name for the control plane. | |
-h, --help | |
help for admin | |
--kubeconfig-dir string Default: "/etc/kubernetes" | |
The path where to save the kubeconfig file. | |
--kubernetes-version string Default: "stable-1" | |
Choose a specific Kubernetes version for the control plane. |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
Generate a kubeconfig file for the kubelet to use only for cluster bootstrapping purposes
Generate the kubeconfig file for the kubelet to use and save it to kubelet.conf file.
Please note that this should only be used for cluster bootstrapping purposes. After your control plane is up, you should request all kubelet credentials from the CSR API.
kubeadm init phase kubeconfig kubelet [flags]
--apiserver-advertise-address string | |
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 int32 Default: 6443 | |
Port for the API Server to bind to. | |
--cert-dir string Default: "/etc/kubernetes/pki" | |
The path where to save and store the certificates. | |
--config string | |
Path to a kubeadm configuration file. | |
--control-plane-endpoint string | |
Specify a stable IP address or DNS name for the control plane. | |
-h, --help | |
help for kubelet | |
--kubeconfig-dir string Default: "/etc/kubernetes" | |
The path where to save the kubeconfig file. | |
--kubernetes-version string Default: "stable-1" | |
Choose a specific Kubernetes version for the control plane. | |
--node-name string | |
Specify the node name. |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
Generate a kubeconfig file for the controller manager to use
Generate the kubeconfig file for the controller manager to use and save it to controller-manager.conf file
kubeadm init phase kubeconfig controller-manager [flags]
--apiserver-advertise-address string | |
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 int32 Default: 6443 | |
Port for the API Server to bind to. | |
--cert-dir string Default: "/etc/kubernetes/pki" | |
The path where to save and store the certificates. | |
--config string | |
Path to a kubeadm configuration file. | |
--control-plane-endpoint string | |
Specify a stable IP address or DNS name for the control plane. | |
-h, --help | |
help for controller-manager | |
--kubeconfig-dir string Default: "/etc/kubernetes" | |
The path where to save the kubeconfig file. | |
--kubernetes-version string Default: "stable-1" | |
Choose a specific Kubernetes version for the control plane. |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
Generate a kubeconfig file for the scheduler to use
Generate the kubeconfig file for the scheduler to use and save it to scheduler.conf file.
kubeadm init phase kubeconfig scheduler [flags]
--apiserver-advertise-address string | |
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 int32 Default: 6443 | |
Port for the API Server to bind to. | |
--cert-dir string Default: "/etc/kubernetes/pki" | |
The path where to save and store the certificates. | |
--config string | |
Path to a kubeadm configuration file. | |
--control-plane-endpoint string | |
Specify a stable IP address or DNS name for the control plane. | |
-h, --help | |
help for scheduler | |
--kubeconfig-dir string Default: "/etc/kubernetes" | |
The path where to save the kubeconfig file. | |
--kubernetes-version string Default: "stable-1" | |
Choose a specific Kubernetes version for the control plane. |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
Using this phase you can create all required static Pod files for the control plane components.
Generate all static Pod manifest files necessary to establish the control plane
This command is not meant to be run on its own. See list of available subcommands.
kubeadm init phase control-plane [flags]
-h, --help | |
help for control-plane |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
Generate all static Pod manifest files
Generate all static Pod manifest files
kubeadm init phase control-plane all [flags]
# Generates all static Pod manifest files for control plane components,
# functionally equivalent to what is generated by kubeadm init.
kubeadm init phase control-plane all
# Generates all static Pod manifest files using options read from a configuration file.
kubeadm init phase control-plane all --config config.yaml
--apiserver-advertise-address string | |
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 int32 Default: 6443 | |
Port for the API Server to bind to. | |
--apiserver-extra-args <comma-separated 'key=value' pairs> | |
A set of extra flags to pass to the API Server or override default ones in form of <flagname>=<value> | |
--cert-dir string Default: "/etc/kubernetes/pki" | |
The path where to save and store the certificates. | |
--config string | |
Path to a kubeadm configuration file. | |
--control-plane-endpoint string | |
Specify a stable IP address or DNS name for the control plane. | |
--controller-manager-extra-args <comma-separated 'key=value' pairs> | |
A set of extra flags to pass to the Controller Manager or override default ones in form of <flagname>=<value> | |
--dry-run | |
Don't apply any changes; just output what would be done. | |
--feature-gates string | |
A set of key=value pairs that describe feature gates for various features. Options are: | |
-h, --help | |
help for all | |
--image-repository string Default: "k8s.gcr.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. | |
--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". "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. | |
--pod-network-cidr string | |
Specify range of IP addresses for the pod network. If set, the control plane will automatically allocate CIDRs for every node. | |
--scheduler-extra-args <comma-separated 'key=value' pairs> | |
A set of extra flags to pass to the Scheduler or override default ones in form of <flagname>=<value> | |
--service-cidr string Default: "10.96.0.0/12" | |
Use alternative range of IP address for service VIPs. |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
Generates the kube-apiserver static Pod manifest
Generates the kube-apiserver static Pod manifest
kubeadm init phase control-plane apiserver [flags]
--apiserver-advertise-address string | |
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 int32 Default: 6443 | |
Port for the API Server to bind to. | |
--apiserver-extra-args <comma-separated 'key=value' pairs> | |
A set of extra flags to pass to the API Server or override default ones in form of <flagname>=<value> | |
--cert-dir string Default: "/etc/kubernetes/pki" | |
The path where to save and store the certificates. | |
--config string | |
Path to a kubeadm configuration file. | |
--control-plane-endpoint string | |
Specify a stable IP address or DNS name for the control plane. | |
--dry-run | |
Don't apply any changes; just output what would be done. | |
--feature-gates string | |
A set of key=value pairs that describe feature gates for various features. Options are: | |
-h, --help | |
help for apiserver | |
--image-repository string Default: "k8s.gcr.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. | |
--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". "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. | |
--service-cidr string Default: "10.96.0.0/12" | |
Use alternative range of IP address for service VIPs. |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
Generates the kube-controller-manager static Pod manifest
Generates the kube-controller-manager static Pod manifest
kubeadm init phase control-plane controller-manager [flags]
--cert-dir string Default: "/etc/kubernetes/pki" | |
The path where to save and store the certificates. | |
--config string | |
Path to a kubeadm configuration file. | |
--controller-manager-extra-args <comma-separated 'key=value' pairs> | |
A set of extra flags to pass to the Controller Manager or override default ones in form of <flagname>=<value> | |
--dry-run | |
Don't apply any changes; just output what would be done. | |
-h, --help | |
help for controller-manager | |
--image-repository string Default: "k8s.gcr.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. | |
--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". "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. | |
--pod-network-cidr string | |
Specify range of IP addresses for the pod network. If set, the control plane will automatically allocate CIDRs for every node. |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
Generates the kube-scheduler static Pod manifest
Generates the kube-scheduler static Pod manifest
kubeadm init phase control-plane scheduler [flags]
--cert-dir string Default: "/etc/kubernetes/pki" | |
The path where to save and store the certificates. | |
--config string | |
Path to a kubeadm configuration file. | |
--dry-run | |
Don't apply any changes; just output what would be done. | |
-h, --help | |
help for scheduler | |
--image-repository string Default: "k8s.gcr.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. | |
--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". "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. | |
--scheduler-extra-args <comma-separated 'key=value' pairs> | |
A set of extra flags to pass to the Scheduler or override default ones in form of <flagname>=<value> |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
Use the following phase to create a local etcd instance based on a static Pod file.
Generate static Pod manifest file for local etcd
This command is not meant to be run on its own. See list of available subcommands.
kubeadm init phase etcd [flags]
-h, --help | |
help for etcd |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
Generate the static Pod manifest file for a local, single-node local etcd instance
Generate the static Pod manifest file for a local, single-node local etcd instance
kubeadm init phase etcd local [flags]
# Generates the static Pod manifest file for etcd, functionally
# equivalent to what is generated by kubeadm init.
kubeadm init phase etcd local
# Generates the static Pod manifest file for etcd using options
# read from a configuration file.
kubeadm init phase etcd local --config config.yaml
--cert-dir string Default: "/etc/kubernetes/pki" | |
The path where to save and store the certificates. | |
--config string | |
Path to a kubeadm configuration file. | |
-h, --help | |
help for local | |
--image-repository string Default: "k8s.gcr.io" | |
Choose a container registry to pull control plane images from | |
--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". "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. |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
You can use this command to upload the kubeadm configuration to your cluster. Alternatively, you can use kubeadm config.
Upload the kubeadm and kubelet configuration to a ConfigMap
This command is not meant to be run on its own. See list of available subcommands.
kubeadm init phase upload-config [flags]
-h, --help | |
help for upload-config |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
Upload all configuration to a config map
Upload all configuration to a config map
kubeadm init phase upload-config all [flags]
--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. |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
Upload the kubeadm ClusterConfiguration to a ConfigMap
Upload the kubeadm ClusterConfiguration to a ConfigMap called kubeadm-config in the kube-system namespace. This enables correct configuration of system components and a seamless user experience when upgrading.
Alternatively, you can use kubeadm config.
kubeadm init phase upload-config kubeadm [flags]
# upload the configuration of your cluster
kubeadm init phase upload-config --config=myConfig.yaml
--config string | |
Path to a kubeadm configuration file. | |
-h, --help | |
help for kubeadm | |
--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. |
Upload the kubelet component config to a ConfigMap
Upload kubelet configuration extracted from the kubeadm InitConfiguration object to a ConfigMap of the form kubelet-config-1.X in the cluster, where X is the minor version of the current (API Server) Kubernetes version.
kubeadm init phase upload-config kubelet [flags]
# Upload the kubelet configuration from the kubeadm Config file to a ConfigMap in the cluster.
kubeadm init phase upload-config kubelet --config kubeadm.yaml
--config string | |
Path to a kubeadm configuration file. | |
-h, --help | |
help for kubelet | |
--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. |
Use the following phase to upload control-plane certificates to the cluster. By default the certs and encryption key expire after two hours.
Upload certificates to kubeadm-certs
This command is not meant to be run on its own. See list of available subcommands.
kubeadm init phase upload-certs [flags]
--certificate-key string | |
Key used to encrypt the control-plane certificates in the kubeadm-certs Secret. | |
--config string | |
Path to a kubeadm configuration file. | |
-h, --help | |
help for upload-certs | |
--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-certificate-key-print | |
Don't print the key used to encrypt the control-plane certificates. | |
--upload-certs | |
Upload control-plane certificates to the kubeadm-certs Secret. |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
Use the following phase to label and taint the node with the node-role.kubernetes.io/master=""
key-value pair.
Mark a node as a control-plane
Mark a node as a control-plane
kubeadm init phase mark-control-plane [flags]
# Applies control-plane label and taint to the current node, functionally equivalent to what executed by kubeadm init.
kubeadm init phase mark-control-plane --config config.yaml
# Applies control-plane label and taint to a specific node
kubeadm init phase mark-control-plane --node-name myNode
--config string | |
Path to a kubeadm configuration file. | |
-h, --help | |
help for mark-control-plane | |
--node-name string | |
Specify the node name. |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
Use the following phase to configure bootstrap tokens.
Generates bootstrap tokens used to join a node to a cluster
Bootstrap tokens are used for establishing bidirectional trust between a node joining the cluster and a control-plane node.
This command makes all the configurations required to make bootstrap tokens works and then creates an initial token.
kubeadm init phase bootstrap-token [flags]
# Make all the bootstrap token configurations and create an initial token, functionally
# equivalent to what generated by kubeadm init.
kubeadm init phase bootstrap-token
--config string | |
Path to a kubeadm configuration file. | |
-h, --help | |
help for bootstrap-token | |
--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-token-print | |
Skip printing of the default bootstrap token generated by 'kubeadm init'. |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
Use the following phase to update settings relevant to the kubelet after TLS bootstrap. You can use the all
subcommand to run all kubelet-finalize
phases.
Updates settings relevant to the kubelet after TLS bootstrap
Updates settings relevant to the kubelet after TLS bootstrap
kubeadm init phase kubelet-finalize [flags]
# Updates settings relevant to the kubelet after TLS bootstrap"
kubeadm init phase kubelet-finalize all --config
-h, --help | |
help for kubelet-finalize |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
Run all kubelet-finalize phases
Run all kubelet-finalize phases
kubeadm init phase kubelet-finalize all [flags]
# Updates settings relevant to the kubelet after TLS bootstrap"
kubeadm init phase kubelet-finalize all --config
--cert-dir string Default: "/etc/kubernetes/pki" | |
The path where to save and store the certificates. | |
--config string | |
Path to a kubeadm configuration file. | |
-h, --help | |
help for all |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
Enable kubelet client certificate rotation
Enable kubelet client certificate rotation
kubeadm init phase kubelet-finalize experimental-cert-rotation [flags]
--cert-dir string Default: "/etc/kubernetes/pki" | |
The path where to save and store the certificates. | |
--config string | |
Path to a kubeadm configuration file. | |
-h, --help | |
help for experimental-cert-rotation |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
You can install all the available addons with the all
subcommand, or install them selectively.
Install required addons for passing conformance tests
This command is not meant to be run on its own. See list of available subcommands.
kubeadm init phase addon [flags]
-h, --help | |
help for addon |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
Install all the addons
Install all the addons
kubeadm init phase addon all [flags]
--apiserver-advertise-address string | |
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 int32 Default: 6443 | |
Port for the API Server to bind to. | |
--config string | |
Path to a kubeadm configuration file. | |
--control-plane-endpoint string | |
Specify a stable IP address or DNS name for the control plane. | |
--feature-gates string | |
A set of key=value pairs that describe feature gates for various features. Options are: | |
-h, --help | |
help for all | |
--image-repository string Default: "k8s.gcr.io" | |
Choose a container registry to pull control plane images from | |
--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. | |
--kubernetes-version string Default: "stable-1" | |
Choose a specific Kubernetes version for the control plane. | |
--pod-network-cidr string | |
Specify range of IP addresses for the pod network. If set, the control plane will automatically allocate CIDRs for every node. | |
--service-cidr string Default: "10.96.0.0/12" | |
Use alternative range of IP address for service VIPs. | |
--service-dns-domain string Default: "cluster.local" | |
Use alternative domain for services, e.g. "myorg.internal". |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
Install the CoreDNS addon to a Kubernetes cluster
Install the CoreDNS addon components via the API server. Please note that although the DNS server is deployed, it will not be scheduled until CNI is installed.
kubeadm init phase addon coredns [flags]
--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: | |
-h, --help | |
help for coredns | |
--image-repository string Default: "k8s.gcr.io" | |
Choose a container registry to pull control plane images from | |
--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. | |
--kubernetes-version string Default: "stable-1" | |
Choose a specific Kubernetes version for the control plane. | |
--service-cidr string Default: "10.96.0.0/12" | |
Use alternative range of IP address for service VIPs. | |
--service-dns-domain string Default: "cluster.local" | |
Use alternative domain for services, e.g. "myorg.internal". |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
Install the kube-proxy addon to a Kubernetes cluster
Install the kube-proxy addon components via the API server.
kubeadm init phase addon kube-proxy [flags]
--apiserver-advertise-address string | |
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 int32 Default: 6443 | |
Port for the API Server to bind to. | |
--config string | |
Path to a kubeadm configuration file. | |
--control-plane-endpoint string | |
Specify a stable IP address or DNS name for the control plane. | |
-h, --help | |
help for kube-proxy | |
--image-repository string Default: "k8s.gcr.io" | |
Choose a container registry to pull control plane images from | |
--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. | |
--kubernetes-version string Default: "stable-1" | |
Choose a specific Kubernetes version for the control plane. | |
--pod-network-cidr string | |
Specify range of IP addresses for the pod network. If set, the control plane will automatically allocate CIDRs for every node. |
--rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
For more details on each field in the v1beta3
configuration you can navigate to our API reference pages.
kubeadm init
or kubeadm join
© 2022 The Kubernetes Authors
Documentation Distributed under CC BY 4.0.
https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-init-phase/