问题
How to install kubeadm for Kubernetes in macOS. When tempting to use
brew install kubeadm
I get this error
Error: No available formula with the name "kubeadm"
==> Searching for a previously deleted formula (in the last month)..
NB : In macOS I can't use apt-get
回答1:
Not sure about MAC OS
The supported platforms on their list are:
Ubuntu 16.04+
Debian 9
CentOS 7
RHEL 7
Fedora 25/26 (best-effort)
HypriotOS v1.0.1+
Container Linux (tested with 1800.6.0)
https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/
KubeAdm is not for Desktop local environment.
You can install Docker For MAC that will install the minikube environment for you.
回答2:
You are not able to directly install kubeadm and set up kubernetes cluster locally on MAC OS because of docker. Unfortunately for MAC we should have VirtualBox where Docker will run + boot2docker.
And the best option here(as @Ijaz Ahmad Khan mentioned) is to use Docker Desktop for Mac
You can use below guide to correctly configure your cluster: How to Install Kubernetes on Mac
回答3:
At the moment kubernetes server components doesn't ship any Darwin OS(MAC OS) binaries so the control plane component can't directly run under MACOS. Although they ship kubectl for Darwin OS which can use any API Server to connect to and deploy the applications.
However I was able to run the Hyperkube
Binary inside the container that can support the all control plane components but this would all be under docker container so that isn't essentially a Darwin OS supported Control Plane.
You can try this if you just want to use local installs: https://github.com/kubernetes/kubernetes/tree/master/cluster/images/hyperkube
also If you are really looking to do everything in MAC , then possibly Install Hyperkit driver and that will allow you do pretty much the same thing to pull up the control plane images and built it up.
来源:https://stackoverflow.com/questions/57044917/install-kubeadm-in-macos