minikube

curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
wget https://storage.googleapis.com/minikube/releases/v0.25.0/minikube-linux-amd64
  • 修改蓝灯配置(用于配置minikube节点的docker 代理,下载墙外的镜像)
$ vim ~/.lantern/settings.yaml
127.0.0.1 -> 192.168.0.102
  • 启动单节点集群
minikube start --docker-env HTTP_PROXY=http://192.168.0.102:45572/ --docker-env HTTPS_PROXY=http://192.168.0.102:45572/  --docker-env NO_PROXY=localhost,127.0.0.0/8,::1,192.0.0.0/8,192.168.0.102 --insecure-registry  192.168.0.102 
  • 查看集群状态
➜  ~ minikube status
minikube: Running
cluster: Running
kubectl: Correctly Configured: pointing to minikube-vm at 192.168.99.100
  • 配置连接k8s vm节点中的docker
eval $(minikube docker-env)

docker login 192.168.0.102
  • 打开k8s UI管理界面
➜  ~ minikube dashboard
Opening kubernetes dashboard in default browser...
➜  ~ Using PPAPI flash.
 --ppapi-flash-path=/usr/lib/adobe-flashplugin/libpepflashplayer.so --ppapi-flash-version=

➜  ~ 已在现有的浏览器会话中创建新的窗口。

  • 查看minikube VM节点的IP
➜  ~ minikube ip
192.168.99.100
  • 通过expose的nodePort访问service
➜  ~ minikube service hello-minikube --url                                             
http://192.168.99.100:30881
    原文作者:AEGQ
    原文地址: https://www.jianshu.com/p/a7620f73c7f3
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞