跳到主要内容
赞助推荐 Claude Team 合租,少折腾账号
>80aj_
工程实践

Mac 本地搭建 K8S 集群:Docker Desktop + 阿里云镜像实战

4 分钟阅读阅读(295)
赞助推荐 团队协作里的 AI 办公工作台

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

Quote

  1. Mac + Docker + K8S 本地搭建K8S集群

pre code{
white-space: pre;
}

赞助推荐 一人公司 · 创业装备库
赞助推荐 一人公司 · 创业装备库
赞助推荐 一键部署 AI 大模型
赞助推荐 一键部署 AI 大模型
赞(0)
未经允许不得转载:80aj » Mac 本地搭建 K8S 集群:Docker Desktop + 阿里云镜像实战
赞助推荐 低成本上手 Claude Code 的中转选择
赞助推荐 低成本上手 Claude Code 的中转选择
赞助推荐 一键部署 AI 大模型
赞助推荐 一键部署 AI 大模型