Kubernetes Learning

Kubernetes Dashboard

Preeti Sharma
Simply Dev
5 min readJun 9, 2020

--

I simply need to clarify such that an individual who doesn’t have any earlier information on container and clusters ought to have the option to comprehend what Kubernetes is and what it does.

To begin with, we comprehend why container.

Suppose you need to present a cycle to your child on his birthday. Presently if the cycle is conveyed to you with parts isolated and a manual that depicts how to join the parts. Indeed, you may wind up screwing things.

Rather imagine a scenario where the cycle itself is instant and packed in a container and conveyed to your street number, with no manual intercession required. Ain’t unreasonably great.

The individual pieces of the cycle are the dependencies of the project which may work in one spot and not the other.

The cycle organization is the engineer’s center point, and the customer here is the one utilizing our item.

To tackle this issue docker containers came into the image.

What Kubernetes is?

Situation 1 ) Cricket coordinate.

Consider India and Pakistan are playing world cup last, out of nowhere a player got harmed. What occurs straightaway?

Another player replaces the harmed one. With the goal that implies all the 11 players who are playing ought to be sufficiently fit.

The 11 players in the arrangement set.

Their quality is container health.

The physio and group the board who guarantees the strength of the player and measure their wellness is Kubernetes

Every player is a compartment and Kubernetes(a team the executives ) is the orchestrator.

Two normal things that you hear in Kubernetes → services and pods

Alright, again a nontechnical conversation.

Suppose you just brought forth a little infant. Presently your family members need to meet the child, however, in the emergency clinic ward there are 1000′ s of children and they got confused.

The subsequent stage would be, to call you and request that you show who’s your infant is.

Services and pods are also similar. Service is a parent and pod is a child.

At the point when a pod gets executed or another pod is begun, the IP address of the pod continues changing and it’s not in our control. So the best way to get to the pod is through the service that has an association with the pod by means of labels.

Terms

1 . Kubeconfig : kubeconfig file is used to find the information needed to choose the cluster and communicate with the API service of the cluster and communicate with the API server of the cluster. A file that uses access to clusters is called the kubeconfig file.

2. Cluster :Set of node machines for running customized applications.

3. Context : A context element is used to group access parameter under a convinent name. It contains three parameters — — -> Cluster , Namespace and user.

4. Namespace : It is used to divide cluster resources between multiple users. It cannot be nested between one another and each resource can only be one namespace.

5. Users — — — — — -> Service Account : It is managed by Kubernetes API and bound by namespace call through API .| Normal Users : It is maintain by outside independent service. It cannot be added to cluster through API call . Kubernets does not have object represent normal user account.

Kubernetes gives loads of functionality which is helpful for us. Like, Kubernetes Dashboard is a universally useful, online UI for Kubernetes groups. It permits clients to oversee applications running in the cluster as well as troubleshoot them and manage the cluster itself.

You can use Dashboard to get an overview of applications running on your cluster, as well as for creating or modifying individual Kubernetes resources (such as Deployments, Jobs, DaemonSets, etc). For example, you can scale a Deployment, initiate a rolling update, restart a pod, or deploy new applications using a deploy wizard.

The dashboard also provides information on the state of Kubernetes resources in your cluster and on any errors that may have occurred.

Authentication

1. User client certificate: Tokens, proxy, HTTP, basic auth to authenticate Http request.

2. Through authenticate plugins

3. HTTP request made to API server, plugins attempt to associate the attribute with the request.

Every service account has a secret password/token form.

kubectl create namespace

This command is useful for creating a namespace.

kubectl get ns

This command is used to get the namespace.

kubectl serviceaccount -n Preeti

This command is used to access the node Preeti from the service account.

kubectl describe secret tokenname -n Okgoogle

As to check the contents of the node with the help of a secret token.

kubectl delete

This will delete the Kubernetes dashboard.

kubectl delete — all kubernetes-dashboard

It will delete all dashboard in Kubernetes.

kubectl get po -n kubernetes-dashboard

|>service account ready

|>default account

*If anyone wants to access the cluster from outside you can use node port.

Kubectl edit svc Kubernetes-dashboard -n kubernetes-dashboard

After this edit the type to nodeport such that the cluster could be accessed externally.

Access

Access the acquired IP on the incognito or firefox

Thank you

View cluster resources

--

--