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 | 😄 Darwin 12.0.1 (arm64) 上的 minikube v1.24.0 |
Check Status of Minikube
To check the status of minikube, you can execute:
1 | minkube status |
System will output
1 | minikube |
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 |