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
.
Upload a configuration file to the in-cluster ConfigMap for kubeadm configuration.
Using this command, you can upload configuration to the ConfigMap in the cluster using the same config file you gave to ‘kubeadm init’. If you initialized your cluster using a v1.7.x or lower kubeadm client and used the –config option, you need to run this command with the same config file before upgrading to v1.8 using ‘kubeadm upgrade’.
The configuration is located in the “kube-system” namespace in the “kubeadm-config” ConfigMap.
kubeadm config upload from-file [flags]
--config string | |
Path to a kubeadm config file. WARNING: Usage of a configuration file is experimental. | |
-h, --help | |
help for from-file |
--kubeconfig string Default: "/etc/kubernetes/admin.conf" | |
The KubeConfig file to use when talking to the cluster. |
Create the in-cluster configuration file for the first time from using flags.
Using this command, you can upload configuration to the ConfigMap in the cluster using the same flags you gave to ‘kubeadm init’. If you initialized your cluster using a v1.7.x or lower kubeadm client and set certain flags, you need to run this command with the same flags before upgrading to v1.8 using ‘kubeadm upgrade’.
The configuration is located in the “kube-system” namespace in the “kubeadm-config” ConfigMap.
kubeadm config upload from-flags [flags]
--apiserver-advertise-address string | |
The IP address the API Server will advertise it's listening on. Specify '0.0.0.0' to use the address of the default network interface. | |
--apiserver-bind-port int32 Default: 6443 | |
Port for the API Server to bind to. | |
--apiserver-cert-extra-sans stringSlice | |
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. | |
--cri-socket string Default: "/var/run/dockershim.sock" | |
Specify the CRI socket to connect to. | |
--feature-gates string | |
A set of key=value pairs that describe feature gates for various features. Options are: Auditing=true|false (ALPHA - default=false) CoreDNS=true|false (BETA - default=false) DynamicKubeletConfig=true|false (ALPHA - default=false) SelfHosting=true|false (ALPHA - default=false) StoreCertsInSecrets=true|false (ALPHA - default=false) |
|
-h, --help | |
help for from-flags | |
--kubernetes-version string Default: "stable-1.10" | |
Choose a specific Kubernetes version for the control plane. | |
--node-name string | |
Specify the node name. | |
--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". | |
--token string | |
The token to use for establishing bidirectional trust between nodes and masters. | |
--token-ttl duration Default: 24h0m0s | |
The duration before the bootstrap token is automatically deleted. If set to '0', the token will never expire. |
--kubeconfig string Default: "/etc/kubernetes/admin.conf" | |
The KubeConfig file to use when talking to the cluster. |
View the kubeadm configuration stored inside the cluster.
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]
-h, --help | |
help for view |
--kubeconfig string Default: "/etc/kubernetes/admin.conf" | |
The KubeConfig file to use when talking to the cluster. |