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

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.

主站蜘蛛池模板: 环江| 茶陵县| 隆回县| 佛教| 麻城市| 迁西县| 黄浦区| 松江区| 凤山市| 获嘉县| 南澳县| 交口县| 社会| 金坛市| 金乡县| 盐山县| 昌黎县| 阳山县| 兴安盟| 思茅市| 噶尔县| 乐至县| 潞西市| 衢州市| 合肥市| 扶余县| 连江县| 东源县| 无锡市| 南漳县| 仲巴县| 开封市| 济源市| 巨鹿县| 文化| 罗甸县| 泾阳县| 长宁县| 九台市| 游戏| 鲜城|