


Here, we will cover installation of Kubernetes. Please ensure you have followed Step 1 of this series to complete Docker CLI installation.
Once that is done, please proceed with installation of Kubernetes on your machine. We will be using the kind tool.
Step 1: Open the Ubuntu App and get into the shell.
Step 2: Run below commands in sequence.
curl -Lo ./kind https://github.com/kubernetes-sigs/kind/releases/download/v0.7.0/kind-linux-amd64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/
echo $KUBECONFIG
ls $HOME/.kube
kind create cluster --name wslkind
Note: The shell might be seem stuck for a user input but this is just taking time. No action needed. Let it get completed.
7. ls $HOME/.kube
8. kubectl cluster-info

9. kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-rc6/aio/deploy/recommended.yaml
10. kubectl get all -n kubernetes-dashboard
11. kubectl proxy
Enter the URL on your browser:

Keep this running and open. Open a new WSL session.
12. Copy below and run on the terminal
kubectl apply -f - <<EOF
apiVersion: v1
kind: ServiceAccount
metadata:
name: admin-user
namespace: kubernetes-dashboard
EOF
13. Copy below and run on the terminal
kubectl apply -f - <<EOF
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: admin-user
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: admin-user
namespace: kubernetes-dashboard
EOF
14. Copy below and run on the terminal
kubectl -n kubernetes-dashboard \
describe secret $(kubectl -n kubernetes-dashboard \
get secret | grep admin-user | awk '{print $1}')
15. Above step will provide you the token which you can use in step 11 above.

References:
Comments