Install Minikube on Apple Silicon M1 Mac

Minikube is often used to build local kubernetes development environments, and this article describes how to install Minikube on a computer with apple Silicon M1.

Now, we install the docker-based minikube.

Install Docker

Download Docker Desktop on the docker website, and be sure to select the mac with Apple Chip version.

After the download is complete, install it, and then follow the prompt to install by default.

Download/Setup Minikube

Download the arm64 version of minikube, download address is:

1
https://storage.googleapis.com/minikube/releases/latest/minikube-darwin-arm64

After the download is complete, the file is an executable file and does not require installation. You only need to give execute permission and place it under the PATH path.

The next commands will be executed on the terminal, so open a command terminal first

Execute the following command:

1
chmod +x minikube-darwin-arm64

Then

1
sudo mv minikube-darwin-arm64 /usr/local/bin/minikube

Initialize Minikube

Execute:

1
minikube start --driver="docker" --memory=2048

The first time you run it, you may indicate that the program (minikube) is not an unsafe program and prevent it from running, in this case, you need to complete the operation of agreeing to run in “System Preferences” - > “Security and Privacy” - > “General” and select “Still Running”. Then run the launched command again in the terminal window.

If the system displays a message similar to the following, initialization was successful

1
2
3
4
5
6
7
8
9
10
11
12
😄  Darwin 12.0.1 (arm64) 上的 minikube v1.24.0
👍 Starting control plane node minikube in cluster minikube
🚜 Pulling base image ...
🔥 Creating docker container (CPUs=2, Memory=2048MB) ...
🐳 正在 Docker 20.10.8 中准备 Kubernetes v1.22.3…
▪ Generating certificates and keys ...
▪ Booting up control plane ...
▪ Configuring RBAC rules ...
🔎 Verifying Kubernetes components...
▪ Using image registry.cn-hangzhou.aliyuncs.com/google_containers/storage-provisioner:v5
🌟 Enabled addons: storage-provisioner, default-storageclass
🏄 Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default

Check Status of Minikube

To check the status of minikube, you can execute:

1
minkube status

System will output

1
2
3
4
5
6
minikube
type: Control Plane
host: Running
kubelet: Running
apiserver: Running
kubeconfig: Configured

Stop / Start Minikube

To stop the running minikube, you can execute

1
minikube stop

To start the pause minkube, you can execute

1
minkube start

本文标题:Install Minikube on Apple Silicon M1 Mac

文章作者:Morning Star

发布时间:2022年01月04日 - 11:01

最后更新:2022年01月04日 - 16:01

原始链接:https://www.mls-tech.info/microservice/k8s/minikube-install-on-apple-silicon-m1/

许可协议: 署名-非商业性使用-禁止演绎 4.0 国际 转载请保留原文链接及作者。