Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install kubeadm in macOS

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

like image 250
Smaillns Avatar asked Jul 15 '19 17:07

Smaillns


People also ask

How do I install kubectl on Mac?

If you are on macOS and using Macports package manager, you can install kubectl with Macports. In order for kubectl to find and access a Kubernetes cluster, it needs a kubeconfig file , which is created automatically when you create a cluster using kube-up.sh or successfully deploy a Minikube cluster.

What is Kubernetes kubelet and kubeadm?

kubeadm: the command to bootstrap the cluster. kubelet: the component that runs on all of the machines in your cluster and does things like starting pods and containers. kubectl: the command line util to talk to your cluster.

How do I use kubectl with kubeadm?

Alternatively, you can copy the admin.conf file created when you ran kubeadm init to $HOME/.kube/config on your local machine, which will allow you to use kubectl from it. In most implementations, a container network interface (CNI) is used so the pods can accept traffic directly, which keeps network latency as low as possible.

What is the default container runtime for kubeadm?

By default, kubeadm uses Docker as the container runtime. The kubelet integrates with Docker through the built-in dockershim CRI implementation. See container runtimes for more information. kubeadm: the command to bootstrap the cluster.


3 Answers

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.

like image 189
Ijaz Ahmad Avatar answered Nov 15 '22 06:11

Ijaz Ahmad


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

like image 41
Vit Avatar answered Nov 15 '22 07:11

Vit


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.

like image 39
vgdub Avatar answered Nov 15 '22 07:11

vgdub