Panagiotis Georgiadis
Panagiotis Georgiadis

Reputation: 240

New kubeconfig after k8s update?

When I update my kubernetes (e.g. from 1.7 to 1.8) do I need to download the new kubeconfig file? For some reason the previous one doesn't seem to work.

Upvotes: 0

Views: 607

Answers (1)

Vikram Hosakote
Vikram Hosakote

Reputation: 3684

If using kubeadm, after re-installing or upgrading the k8s cluster, it is always good to use the updated / latest kubeconfig at /etc/kubernetes/admin.conf by doing the following so that stale / old kubeconfig is not used:

mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config

Steps to upgrade kubeadm from from 1.7 to 1.8 are here.

Upvotes: 1

Related Questions