kubeadm升级计划-对/etc/kubernetes/admin.conf的权限被拒绝

时间:2019-12-04 15:08:25

标签: kubernetes kubeadm

我正在尝试获取kubernetes集群的升级计划,但是出现/etc/kubernetes/admin.conf permission denied错误。

获取升级计划。

$ 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

获取/etc/kubernetes/admin.conf文件的权限。

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

1 个答案:

答案 0 :(得分:1)

愚蠢的我!您必须以sudo权限执行此命令。

$ sudo kubeadm upgrade plan