top of page

Docker CLI and Kubernetes Installation on Windows – Part 2


Image credits - https://www.youtube.com/watch?v=Cvrqmq9A3tA

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.

  1. curl -Lo ./kind https://github.com/kubernetes-sigs/kind/releases/download/v0.7.0/kind-linux-amd64

  2. chmod +x ./kind

  3. sudo mv ./kind /usr/local/bin/

  4. echo $KUBECONFIG

  5. ls $HOME/.kube

  6. 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


 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:

1 view0 comments

Opmerkingen


bottom of page