A tutorial about how to setup a local k8s cluster on MacOS for development.
Docker
on Mac with this instruction, latest version of docker embedded native support for Kubernetes.Docker is running
and Kubernetes is running
.docker-for-desktop
option, select from docker -> Kubernetes-> docker-for-desktop
.docker-for-desktop
kubectl config use-context docker-for-desktop
otherwise, kubectl will not be able to connect to the local cluster.
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v1.10.1/src/deploy/recommended/kubernetes-dashboard.yaml -v=8
kubectl get pod --namespace=kube-system | grep dashboard
kubernetes-dashboard-669f9bbd46-p4f7c 1/1 Running 1 1h
kubectl proxy
# URL
http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/#!/login
kubectl -n kube-system get secret
kubectl -n kube-system describe secrets kubernetes-dashboard-token-tf6n8
kubectl delete -f https://raw.githubusercontent.com/kubernetes/dashboard/v1.10.1/src/deploy/recommended/kubernetes-dashboard.yaml