Install Kubernetes on Mac
Posted Dream_it_possible!
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Install Kubernetes on Mac相关的知识,希望对你有一定的参考价值。
Prepare
1. We need docker engine as a driver to install Kubernetes, so we can install docker-desktop-for mac , it helps us easily make a docker engine,use the link below to download docker images for mac
https://www.docker.com/get-started
2. Install minikube
minikube is a tool to help us to install kubernetes, If the Brew Package Manager is installed:
brew install minikube
If which minikube
fails after installation via brew, you may have to remove the old minikube links and link the newly installed binary:
brew unlink minikube
brew link minikube
From what mentioned above, minikube should work!Let's move on the next step.
Install Kubernetes
If you install minikube successfully, use the following command to install kubernetes
minikube start
If there is a block during the startup process, please check whether the docker is started!
We can adopt this way to link docker engine,start a cluster using the docker driver:
minikube start --driver=docker
Making docker the default driver:
minikube config set driver docker
If you finished the config for the docker engine, we can use minikube to start the kubernetes cluster.
When needed images are pulled, you can see like this:
However, It didn't work when I wondered to know the version of kubectl!
To solve this problem, we can use the instruction brew!
brew install kubectl
If you got a warning after you finished installing kubectl, just input the instruction:
brew link kubectl-cli
There are some tips below:
It's a good choice to use kubectl to check whether the kubernetes are sucessfully installed!
Finally,If you want to see the dashboard for kubernetes, minikube can give you a hand
It will open a default brower to display the kubernetes dashboard!
That's all,wish you good luck!
reference: https://minikube.sigs.k8s.io/docs/start/
以上是关于Install Kubernetes on Mac的主要内容,如果未能解决你的问题,请参考以下文章
Install Different Node Version on Mac
Install Terraform on Windows, Linux and Mac OS