官术网_书友最值得收藏!

  • Kubernetes on AWS
  • Ed Robinson
  • 376字
  • 2021-06-10 18:41:27

Using the dashboard

The Kubernetes dashboard is a web application that runs within your Kubernetes cluster and offers an alternative, more graphical solution, for exploring and monitoring your cluster.

Minikube automatically installs the dashboard and provides a command that will open it in your web browser:

    $ minikube dashboard
The Kubernetes dashboard

The dashboard interface is very easy to use, and you should begin to notice more than a few similarities with the way that kubectl works, since they both allow you to interact with the same underlying API.

The Navigation bar on the left of the screen gives access to screens showing a list of resources of a particular kind. This is similar to the functionality provided by the kubectl get command:

Using the Kubernetes dashboard to list currently running pods

In this view, we can click on the icon that looks like a stack of papers in order to open a log viewer to view the logs captured from standard out in each container in the pod:

Viewing container logs in the Kubernetes dashboard

Other resources have other options appropriate to their function. For example, Deployments and Replica Sets have a dialog to scale the number of pods up or down.

By clicking on the name of a particular resource, we get a view that shows similar information to kubectl describe:

The detail screen provides us quite a lot of information about pods or other resources in Kubernetes:

As well as an overview of the configuration and settings for the resources, if you scroll to the bottom of the page, you should be able to see a feed of events. This is very useful if you are trying to debug issues and will highlight any errors or problems with a running resource.

For pods, we get a number of other options for managing and inspecting the container. For example, opening an in-browser terminal by clicking the exec button:

Debugging a container using an interactive shell in the Kubernetes dashboard

Currently, for this feature to work properly, your container needs to have /bin/bash available. This might change in future versions of the dashboard, but for now, to make this work add RUN apk add --no-cache bash to your Dockerfile and deploy the newly built image.

主站蜘蛛池模板: 武平县| 百色市| 云安县| 宜都市| 星座| 娱乐| 沂南县| 武汉市| 光泽县| 墨江| 普安县| 长沙县| 贵定县| 克东县| 扶沟县| 平泉县| 富阳市| 邵阳县| 易门县| 阿巴嘎旗| 孙吴县| 信阳市| 田林县| 自贡市| 信丰县| 寿宁县| 建瓯市| 潞城市| 平阳县| 阿图什市| 河北省| 封开县| 寻乌县| 林周县| 侯马市| 新闻| 扬州市| 天全县| 盖州市| 汽车| 政和县|