kubeadm upgrade plan - permission denied to /etc/kubernetes/admin.conf

12/4/2019

I'm trying to get upgrade plan of my kubernetes cluster, but I got /etc/kubernetes/admin.conf permission denied error.

Get upgrade plan.

$ kubeadm upgrade plan 
couldn't create a Kubernetes client from file "/etc/kubernetes/admin.conf": failed to load admin kubeconfig: open /etc/kubernetes/admin.conf: permission denied

Get permissions for /etc/kubernetes/admin.conf file.

$ ls -l /etc/kubernetes/admin.conf 
-rw-------. 1 root root 5455 Dec  4 14:01 /etc/kubernetes/admin.conf
-- Lukasz Dynowski
kubeadm
kubernetes

1 Answer

12/4/2019

Silly me! You have to execute this command with sudo rights.

$ sudo kubeadm upgrade plan 
-- Lukasz Dynowski
Source: StackOverflow