# 启动集群 $ minikube start 😄 minikube v1.24.0 on Centos 7.9.2009 (amd64) ✨ Automatically selected the docker driver
⛔ Requested memory allocation (1833MB) is less than the recommended minimum 1900MB. Deployments may fail.
🧯 The requested memory allocation of 1833MiB does not leave room for system overhead (total system memory: 1833MiB). You may face stability issues. 💡 Suggestion: Start minikube with less memory allocated: 'minikube start --memory=1833mb'
👍 Starting control plane node minikube in cluster minikube 🚜 Pulling base image ... 💾 Downloading Kubernetes v1.22.3 preload ... > preloaded-images-k8s-v13-v1...: 501.73 MiB / 501.73 MiB 100.00% 6.11 MiB > index.docker.io/kicbase/sta...: 355.77 MiB / 355.78 MiB 100.00% 1.55 MiB ❗ minikube was unable to download gcr.io/k8s-minikube/kicbase:v0.0.28, but successfully downloaded docker.io/kicbase/stable:v0.0.28 as a fallback image 🔥 Creating docker container (CPUs=2, Memory=1833MB) ... ❗ This container is having trouble accessing https://k8s.gcr.io 💡 To pull new external images, you may need to configure a proxy: https://minikube.sigs.k8s.io/docs/reference/networking/proxy/ 🐳 Preparing Kubernetes v1.22.3 on Docker 20.10.8 ... ▪ 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: default-storageclass, storage-provisioner 💡 kubectl not found. If you need it, try: 'minikube kubectl -- get pods -A' 🏄 Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
设置环境变量别名
1 2 3
$ alias kubectl="minikube kubectl --" # 初始化 pod $ kubectl get pod
$ kubectl get nodes NAME STATUS ROLES AGE VERSION master Ready control-plane,master 24m v1.23.1 node1 Ready <none> 7m17s v1.23.1 node2 Ready <none> 3m52s v1.23.1