😄 Darwin 12.4 (arm64) 上的 minikube v1.26.0 ✨ 自动选择 docker 驱动。其他选项:parallels, ssh 📌 Using Docker Desktop driver with root privileges 👍 Starting control plane node minikube in cluster minikube 🚜 Pulling base image ... 🔥 Creating docker container (CPUs=2, Memory=4000MB) ... 🐳 正在 Docker 20.10.17 中准备 Kubernetes v1.24.1… ▪ Generating certificates and keys ... ▪ Booting up control plane ... ▪ Configuring RBAC rules ... 🔎 Verifying Kubernetes components... ▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5 🌟 Enabled addons: storage-provisioner, default-storageclass 🏄 Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
初始化minikube后,可以查看当前的node
1 2 3 4
kubectl get node
NAME STATUS ROLES AGE VERSION minikube Ready control-plane 93s v1.24.1
通过minikube新建一个node
1 2 3 4 5 6 7 8 9 10
minikube node add
😄 添加节点 m02 至集群 minikube ❗ Cluster was created without any CNI, adding a node to it might cause broken networking. 👍 Starting worker node minikube-m02 in cluster minikube 🚜 Pulling base image ... 🔥 Creating docker container (CPUs=2, Memory=2200MB) ... 🐳 正在 Docker 20.10.17 中准备 Kubernetes v1.24.1… 🔎 Verifying Kubernetes components... 🏄 Successfully added m02 to minikube!
新建node后,查看当前node
1 2 3 4 5
kubectl get node
NAME STATUS ROLES AGE VERSION minikube Ready control-plane 3m48s v1.24.1 minikube-m02 Ready <none> 50s v1.24.1
可以看到,这里多出了一个名为’minikube-m02’的node。
通过docker查看当前容器
1 2 3 4 5
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES a52a7710e0dc gcr.io/k8s-minikube/kicbase:v0.0.32 "/usr/local/bin/entr…" About a minute ago Up About a minute 0.0.0.0:49926->22/tcp, 0.0.0.0:49927->2376/tcp, 0.0.0.0:49929->5000/tcp, 0.0.0.0:49930->8443/tcp, 0.0.0.0:49928->32443/tcp minikube-m02 53ebe4a2e5f2 gcr.io/k8s-minikube/kicbase:v0.0.32 "/usr/local/bin/entr…" 4 minutes ago Up 4 minutes 0.0.0.0:49616->22/tcp, 0.0.0.0:49617->2376/tcp, 0.0.0.0:49614->5000/tcp, 0.0.0.0:49615->8443/tcp, 0.0.0.0:49613->32443/tcp minikube
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES kubia-deploy-7c9744674c-dz6rl 1/1 Running 0 84s 172.17.0.2 minikube-m02 <none> <none>
|-----------|-------------------|-------------|---------------------------| | NAMESPACE | NAME | TARGET PORT | URL | |-----------|-------------------|-------------|---------------------------| | default | kubia-deploy-http | 8080 | http://192.168.49.2:30555 | |-----------|-------------------|-------------|---------------------------| 🏃 Starting tunnel for service kubia-deploy-http. |-----------|-------------------|-------------|------------------------| | NAMESPACE | NAME | TARGET PORT | URL | |-----------|-------------------|-------------|------------------------| | default | kubia-deploy-http | | http://127.0.0.1:55421 | |-----------|-------------------|-------------|------------------------| 🎉 正通过默认浏览器打开服务 default/kubia-deploy-http... ❗ Because you are using a Docker driver on darwin, the terminal needs to be open to run it.