Reference

Kubernetes v1.15 documentation is no longer actively maintained. The version you are currently viewing is a static snapshot. For up-to-date documentation, see the latest version.

Edit This Page

kubeadm config

Beginning with v1.8.0, kubeadm uploads the configuration of your cluster to a ConfigMap called kubeadm-config in the kube-system namespace, and later reads the ConfigMap when upgrading. This enables correct configuration of system components, and provides a seamless user experience.

You can execute kubeadm config view to view the ConfigMap. If you initialized your cluster using kubeadm v1.7.x or lower, you must use kubeadm config upload to create the ConfigMap before you may use kubeadm upgrade.

You can use kubeadm config print to print the default configuration and kubeadm config migrate to convert your old configuration files to a newer version. kubeadm config images list and kubeadm 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 image the --config method described here has to be used.

kubeadm config view

View the kubeadm configuration stored inside the cluster

Synopsis

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.

kubeadm config view [flags]

Options

  -h, --help   help for view

Options inherited from parent commands

      --kubeconfig string   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. (default "/etc/kubernetes/admin.conf")
      --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” “” “nil” [] []} 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 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   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. (default "/etc/kubernetes/admin.conf")
      --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” “” “nil” [] []} in order to pass validation but not perform the real computation for creating a token.

kubeadm config print join-defaults [flags]

Options

      --component-configs strings   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 join-defaults

Options inherited from parent commands

      --kubeconfig string   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. (default "/etc/kubernetes/admin.conf")
      --rootfs string       [EXPERIMENTAL] The path to the 'real' host root filesystem.

kubeadm config migrate

Read an older version of the kubeadm configuration API types from a file, and output the similar config object for the newer version

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:

Further, kubeadm can only write out config of version “kubeadm.k8s.io/v1beta2”, 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

  -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   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. (default "/etc/kubernetes/admin.conf")
      --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

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

      --config string               Path to kubeadm config file.
      --feature-gates string        A set of key=value pairs that describe feature gates for various features. No feature gates are available in this release.
  -h, --help                        help for list
      --image-repository string     Choose a container registry to pull control plane images from (default "k8s.gcr.io")
      --kubernetes-version string   Choose a specific Kubernetes version for the control plane. (default "stable-1")

Options inherited from parent commands

      --kubeconfig string   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. (default "/etc/kubernetes/admin.conf")
      --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 kubeadm config 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. No feature gates are available in this release.
  -h, --help                        help for pull
      --image-repository string     Choose a container registry to pull control plane images from (default "k8s.gcr.io")
      --kubernetes-version string   Choose a specific Kubernetes version for the control plane. (default "stable-1")

Options inherited from parent commands

      --kubeconfig string   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. (default "/etc/kubernetes/admin.conf")
      --rootfs string       [EXPERIMENTAL] The path to the 'real' host root filesystem.

What's next

Feedback