Kind Guide

Create K8s cluster

We recommend using kind to setup a Kubernetes cluster on a local machine.

Running the following command:

kind create cluster --image kindest/node:v1.15.6 --name submarine
kubectl create namespace submarine

Kubernetes Dashboard (optional)

Deploy

To deploy Dashboard, execute following command:

kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-beta8/aio/deploy/recommended.yaml

Create RBAC

Ensure to grant the cluster access permission of dashboard, run the following command:

kubectl create serviceaccount dashboard-admin-sa
kubectl create clusterrolebinding dashboard-admin-sa --clusterrole=cluster-admin --serviceaccount=default:dashboard-admin-sa

Get access token (optional)

If you want to use the token to login the dashboard, run the following command to get key:

kubectl get secrets
# select the right dashboard-admin-sa-token to describe the secret
kubectl describe secret dashboard-admin-sa-token-6nhkx

Start dashboard service

To start the dashboard service, we can run the following command:

kubectl proxy

Now access Dashboard at:

http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/