Change kubernetes config after init

11/13/2020

If I init my cluster with kubeadm i can add some flags like --apiserver-advertise-address

$ kubeadm init --apiserver-advertise-address 192.168.1.1

How can i change that config later?

-- gseidel
kubernetes

1 Answer

11/14/2020

After kubeadm init all the flags are saved to the manifest files under /etc/kubernetes/manifest/.

  • etcd.yaml
  • kube-apiserver.yaml
  • kube-controller-manager.yaml
  • kube-scheduler.yaml

It depends on the scope of the flag in which of the files it occurred. For example --apiserver-advertise-address is part of the API server and is stored to kube-apiserver.yaml. After changing the file, kubernetes will automatically restart the pod and the config will be applied.

-- gseidel
Source: StackOverflow