-
Notifications
You must be signed in to change notification settings - Fork 29
KinD
Syed Sayem edited this page Sep 26, 2020
·
7 revisions
Instructions for installing KinD (Kubernetes in Docker) on macOS
Start by installing Go, if you don't already have it.
If you’re on a Mac, the quickest way to install Go is with Homebrew:
$ brew update
$ brew install go --cross-compile-common
Once installed, configure the GOPATH with Godep
$ go get github.com/tools/godep
Now add the following to your ~/.zshrc
or ~/.bash_profile
export GOPATH=$HOME/go
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
Install Docker if you don't have it already.
brew cask install docker
https://kubernetes.io/docs/reference/kubectl/overview/
Install with brew:
$ brew install kubernetes-cli
Install via Homebrew:
brew install kind
Create a cluster and switch the context of Kubectl:
$ kind create cluster --name sample
$ export KUBECONFIG="$(kind get kubeconfig-path --name="sample")"
$ kubectl cluster-info
Create a kind.yaml
file in your ~
directory
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
- role: worker
- role: worker
Now, run the following command:
cd ~
kind create cluster --config ~/kind.yaml