0

I need to add below in kube apiserver.yaml .

  • --service-account-signing-key-file=/etc/kubernetes/pki/sa.key
  • --service-account-issuer=kubernetes.default.svc

How k8s will take these changes ? Do i need to restart the kube apiserver ? If it restart then my cluster and all pods will remain there or delete ?

1 Answers1

1

Restarting the Kube API process does not cause data loss, all the data is stored in etcd. Even etcd is safe to be restarted and even recreated one by one since the data is replicated to other etcd nodes.

Workloads (pods) are not affected by Kube API server restart as well. So it's safe to restart.

Max Lobur
  • 5,662
  • 22
  • 35
  • so how to restart kube apiserver , after changing something in kube apiserver.yaml ? Note : I installed k8s cluster with kubeadm – vishal sharma Oct 29 '20 at 09:18
  • Kube api is a static pod (a container). Just find it in `docker ls` and delete, it will get recreated – Max Lobur Oct 29 '20 at 12:18
  • @vishalsharma I also recommend checking out [this SO thread](https://stackoverflow.com/questions/51666507/how-can-kube-apiserver-be-restarted). – Wytrzymały Wiktor Oct 29 '20 at 12:41