kubeadm config
You can use kubeadm config print
to print the default configuration and kubeadm config migrate
toconvert your old configuration files to a newer version. andkubeadm config images pull
can be used to list and pull the images that kubeadm requires.
In Kubernetes v1.13.0 and later to list/pull kube-dns images instead of the CoreDNS imagethe —config
method described herehas to be used.
Using this command, you can view the ConfigMap in the cluster where the configuration for kubeadm is located.
The configuration is located in the “kube-system” namespace in the “kubeadm-config” ConfigMap.
Options
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
Synopsis
Note that sensitive values like the Bootstrap Token fields are replaced with placeholder values like {“abcdef.0123456789abcdef” “” “nil” <nil> [] []} in order to pass validation butnot perform the real computation for creating a token.
kubeadm config print init-defaults [flags]
Options
—component-configs stringSlice | |
A comma-separated list for component config API objects to print the default values for. Available values: [KubeProxyConfiguration KubeletConfiguration]. 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. | |
—rootfs string | |
[EXPERIMENTAL] The path to the 'real' host root filesystem. |
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” “” “nil” <nil> [] []} in order to pass validation butnot perform the real computation for creating a token.
Options
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
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/v1beta2
In other words, the output of this command is what kubeadm actually would read internally if yousubmitted this file to “kubeadm init”
kubeadm config migrate [flags]
Options
-h, —help | |
help for migrate | |
—new-config string | |
Path to the resulting equivalent kubeadm config file using the new API version. Optional, if not specified 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. |
Print a list of images kubeadm will use. The configuration file is used in case any images or image repositories are customized
Options
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 images pull
Synopsis
Pull images used by kubeadm
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:IPv6DualStack=true|false (ALPHA - default=false) | |
-h, —help | |
help for pull | |
—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. |
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. |
Feedback
Was this page helpful?