首页 新闻 会员 周边

Kubernetes: helm 部署应用时出现 Unauthorized 错误

0
悬赏园豆:30 [已解决问题] 解决于 2023-02-02 08:39

通过 helm 向 k8s 集群部署应用时出现下面的错误,请问如何解决?

error: You must be logged in to the server (Unauthorized)
Error: Kubernetes cluster unreachable: the server has asked for the client to provide credentials

k8s
dudu的主页 dudu | 高人七级 | 园豆:30979
提问于:2023-02-02 08:21
< >
分享
最佳答案
0

kubeadm certs check-expiration 命令查看证书没有过期

重新复制 admin.conf 到当前用户目录中解决了

cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
dudu | 高人七级 |园豆:30979 | 2023-02-02 08:39

复制后需要重新设置默认 namespace

kubectl config set-context --current --namespace=production
dudu | 园豆:30979 (高人七级) | 2023-02-02 08:39
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册