英文:
Getting "You must be logged in to the server (Unauthorized)" when trying to use Kubernetes on Docker desktop
问题
"我已在Mac上的Docker桌面上启用了Kubernetes,并在运行以下命令时出现了错误:
kubectl apply -f deployment.yml
我收到如下错误消息:
"error: You must be logged in to the server (Unauthorized)"
感谢任何帮助。"
英文:
I've enabled Kubernetes on Docker Desktop (on a Mac) - and when I run
kubectl apply -f deployment.yml
I get -
"error: You must be logged in to the server (Unauthorized)"
Any help appreciated
答案1
得分: 3
以下是要翻译的内容:
"In my case the problem was that somehow context was changed.
Checked it by
kubectl config current-context
and then changed it back to the correct one by
kubectl config use-context docker-desktop
```"
<details>
<summary>英文:</summary>
In my case the problem was that somehow context was changed.
Checked it by
kubectl config current-context
and then changed it back to the correct one by
kubectl config use-context docker-desktop
</details>
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论