栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

windows搭建Kubernetes(K8s)

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

windows搭建Kubernetes(K8s)

1.安装kubectl
  1.下载kubectl.exe
    https://minikube.sigs.k8s.io/docs/start/
    https://dl.k8s.io/release/v1.22.0/bin/windows/amd64/kubectl.exe
    # c:UsersadminDesktoptempk8skubectl.exe
  2.添加环境变量
    Path: c:UsersadminDesktoptempk8s
2.安装minikube
  1.开启bois的虚拟化  # VT-x或AMD-v
  2.安装Virtualbox  # 也可使用KVM
  3.下载minikube-windows-amd64
    https://github.com/kubernetes/minikube/releases
    https://github.com/kubernetes/minikube/releases/download/v1.23.2/minikube-windows-amd64.exe
    # c:UsersadminDesktoptempk8sminikube-windows-amd64.exe
  4.将minikube-windows-amd64.exe改名为minikube.exe
  5.添加环境变量
    Path: c:UsersadminDesktoptempk8s
3.安装Cygwin
  1.下载
    https://cygwin.com/install.html
    https://cygwin.com/setup-x86_64.exe  # 安装时,选择ali的url
4.启动K8s
  1.打开Cygwin terminal命令行
  2.minikube start # 如果启动两个节点,就输入minikube start -n 2 --memory=2g
5.检查K8s客户端
  kubectl version
6.创建简单的应用
  https://blog.csdn.net/qq_41709494/article/details/103980535
  # 打开cygwin64命令行
  kubectl create deploy nginx --image=nginx:alpine --port=80  # 创建deploy
  kubectl expose deployment nginx --port=80 --target-port=80 --type=NodePort # 
  kubectl get svc
  # curl http://192.168.99.100:32337
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/291597.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号