Setup Kubernetes Dashboard - Linux Guru



Kubernetes Dashboard :

Dashboard is a web-based Kubernetes user interface. You can use Dashboard to deploy containerized applications to a Kubernetes cluster, troubleshoot your containerized application,
  • Setting up the dash board:
$ kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/master/aio/deploy/recommended/kubernetes-dashboard.yaml
  • Create user to access dashboard. We will create user using RABC for default namespace access.
Create RABC yaml and apply it.
apiVersion: v1

kind: ServiceAccount

metadata:

  name: admin-user

  namespace: default

---

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: default
Save it and apply.
$ kubectl apply -f user-rabc.yaml
Now You can access kubernetes cluster via web browser but it will ask you for token. you can get your use token by following command.
  • Access kubernetes dashboard :
$ kubectl proxy
http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/#!/login
  • To get token ID:
$ kubectl -n default get secret | grep admin-user
  • To get token :

$ kubectl -n default describe secret admin-user-token-cvfd

Vishal Vyas [Linux Guru]

Welcome to Linux Guru! Hello, friends. My name is Vishal Vyas, and I am a DevOps engineer with expertise in Linux and Cloud Computing. I am also a Certified Kubernetes Administrator with over 12 years of experience in the IT field, working with various technologies. Through this blog, I aim to share my technical knowledge on Linux, AWS, DevOps, and web technologies. I will be posting about what I have learned from the latest web technologies and similar topics.

Post a Comment

If you have any doubts, Please let me know

Previous Post Next Post