
This article provides a step-by-step guide on setting up a Kubernetes (K8s) dashboard on Docker Desktop for Mac. It
covers the entire process from building the Docker Desktop K8s environment to creating a dashboard, generating access
tokens, and logging in.
Download DockerDeskTop
The procedures utilize Alibaba Cloud's Kubernetes GitHub project, offering practical insights for developers working
with containerized applications in a Mac environment."
https://www.docker.com/products/docker-desktop/
Use ALiYun K8s for deskTop
git clone https://github.com/AliyunContainerService/k8s-for-docker-desktop.git
cd k8s-for-docker-desktop
./load_images.sh
Change user Context
kubectl config use-context docker-desktop
GetClusterInfo
kubectl cluster-info
kubectl get nodes
CreateDashboard
kubectl create -f kubernetes-dashboard.yaml
kubectl get pod -n kubernetes-dashboard
kubectl proxy
BuildToken
kubectl apply -f kube-system-default.yaml
TOKEN=$(kubectl -n kube-system describe secret default| awk '$1=="token:"{print $2}')
kubectl config set-credentials docker-desktop --token="${TOKEN}"
echo $TOKEN
Dashboard Login
http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/#/login
最新评论
照片令人惊艳。万分感谢 温暖。
氛围绝佳。由衷感谢 感受。 你的博客让人一口气读完。敬意 真诚。
实用的 杂志! 越来越好!
又到年底了,真快!
研究你的文章, 我体会到美好的心情。
感谢激励。由衷感谢
好久没见过, 如此温暖又有信息量的博客。敬意。
很稀有, 这么鲜明的文字。谢谢。