-
Couldn't load subscription status.
- 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-commonOnce installed, configure the GOPATH with Godep
$ go get github.com/tools/godepNow 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 kindCreate a cluster and switch the context of Kubectl:
$ kind create cluster --name sample
$ export KUBECONFIG="$(kind get kubeconfig-path --name="sample")"
$ kubectl cluster-infoCreate a kind.yaml file in your ~ directory
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
- role: worker
- role: workerNow, run the following command:
cd ~
kind create cluster --config ~/kind.yaml