到Docker 官网https://www.docker.com/

下载windows操作系统对应的docker软件安装

Docker Desktop Installer-Win.exe 2023-09版本是4.23

下载后双击安装

重启windows后,继续安装

接受服务继续安装

解决碰到的Docker Engine stopped

打开 控制面板》程序》启用或关闭Windows功能, 选中Hyper-V后点击确定,再确定重启电脑进行配置

重启后报“wsl kernerl version too low”

wsl --update

 

启动Docker 

Docker 下启用Kubenetes 

到 Docker 的设置页面,找到Kubenetes,选中Enable Kubenetes,单击Apply&restart

当左下角出现 Kubenetes 的 logo,并逐步变为绿色,Kubenetes就运行起来了 

 访问Kubernetes Dashboard

 通过 kubectl 来安装Kubernetes Dashboard 2.7

kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.7.0/aio/deploy/recommended.yaml

开启API Server访问代理 kubectl proxy 

C:\Users\Administrator>kubectl proxy

Starting to serve on 127.0.0.1:8001

打开浏览器访问Kubernetes Dashboard 

http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/ 

访问web界面,需要输入token才可以登录

1.创建账号

kubectl create serviceaccount dashboard-admin -n kube-system

2. 赋予权限

kubectl create clusterrolebinding dashboard-admin --clusterrole=cluster-admin --serviceaccount=kube-system:dashboard-admin 

 3. 生成token

kubectl -n  kube-system create token dashboard-admin 

4.输入token,登录Kubernetes Dashboard

Logo

AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。

更多推荐