Pages

Friday, November 16, 2018

Kubernetes - DashBoard


A Kubernetes dashboard is a web-based Kubernetes user interface which is used to deploy containerized applications to a Kubernetes cluster, troubleshoot the applications, and manage the cluster itself along with its attendant resources

On a K8 Cluster , run
jagadishwork$Wed Nov 07@ kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml
secret "kubernetes-dashboard-certs" created
serviceaccount "kubernetes-dashboard" created
role.rbac.authorization.k8s.io "kubernetes-dashboard-minimal" created
rolebinding.rbac.authorization.k8s.io "kubernetes-dashboard-minimal" created
deployment.apps "kubernetes-dashboard" created
service "kubernetes-dashboard" created

The Dashboard application will get deployed as a Pod in the kube-system namespace. 
Check the pods in the kube-system namespace,

jagadishwork$Wed Nov 07@ kubectl get pods --namespace=kube-system
NAME                                          READY     STATUS    RESTARTS   AGE
etcd-docker-for-desktop                      1/1       Running    0      16m
kube-apiserver-docker-for-desktop            1/1       Running    0     16m
kube-controller-manager-docker-for-desktop   1/1     Running    0     17m
kube-dns-86f4d74b45-9dghj                    3/3       Running    0     17m
kube-proxy-g7fvw                             1/1       Running    0     17m
kube-scheduler-docker-for-desktop            1/1       Running    0     17m
kubernetes-dashboard-7b9c7bc8c9-zsbxr       1/1       Running    0     8m

Once it is in running state, you can setup a forwarding port to that specific Pod. So in our case, 
we can setup 8443 for the Pod Name as shown below:

Access the Dashboard from https://localhost:8443

Skip this and we will go to next page as below,

Click On Nodes to see existing node details as below,

Run a workload as below, kubectl run hello-nginx --image=nginx --port=80

Click on the Pods to see the pods running as below,

Click on the pod which will take you to page where it will show more details about the 
pod running. It also show the logs generated while creating the pod.

More to Come, Happy Learning :-)

2 comments :