Run these commands solved this issue:mkdir -p $HOME/.kubesudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/configsudo chown $(id -u):$(id -g) $HOME/.kube/config
After running them, kubectl is working.
通过运行特定命令解决kubectl配置问题,确保kubectl正常工作。具体步骤包括创建目录、复制admin.conf文件到.kube/config,并更改文件权限。
Run these commands solved this issue:mkdir -p $HOME/.kubesudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/configsudo chown $(id -u):$(id -g) $HOME/.kube/config
After running them, kubectl is working.
转载于:https://my.oschina.net/chrisforbt/blog/3035527
982
939
9万+

被折叠的 条评论
为什么被折叠?