Playing with WebUI

Kubernetes has the WebUI add-on that visualizes Kubernetes' status, such as pod, replication controller, and service.

Getting ready

The Kubernetes WebUI is assigned as http://<kubernetes master>/ui. However, it is not launched by default, instead there are YAML files in the release binary.

Note

Kubernetes 1.2 introduces the dashboard. For more details, please refer to http://kubernetes.io/docs/user-guide/ui/.

Getting ready

Access to Kubernetes master/ui page

Let's download a release binary and launch the WebUI:

//Download a release binary
$ curl -L -O https://github.com/kubernetes/kubernetes/releases/download/v1.1.4/kubernetes.tar.gz

//extract the binary
$ tar zxf kubernetes.tar.gz
//WebUI YAML file is under the cluster/addons/kube-ui directory 
$ cd kubernetes/cluster/addons/kube-ui/
$ ls
kube-ui-rc.yaml    kube-ui-svc.yaml

How to do it…

Let's launch the kube-ui replication controller and service:

# kubectl create -f kube-ui-rc.yaml 
replicationcontroller "kube-ui-v2" created

# kubectl create -f kube-ui-svc.yaml 
service "kube-ui" created

Note that kube-ui-svc is a type of ClusterIP service; however, it is associated with Kubernetes master (/ui). You can access, from the outside, the Kubernetes network at http://<kubernetes master>/ui.

How to do it…

Launching the kube-ui/ui shows the dashboard screen

How it works…

The kube-ui replication controller accesses the API Server to get the Kubernetes cluster information same as the kubectl command, though read-only. However, it is useful for navigating Kubernetes' status and is easier to explore than the kubectl command.

The following screenshot is an Explore page that shows pod, replication controller, and service instances:

How it works…

On clicking on one of the instances, it shows detailed information, as shown in the following screenshot. It shows a service, which indicates port, node port, and selectors. It is easy to find an associated replication controller and pods:

How it works…

Additionally, UI can also show events, as follows:

How it works…

See also

This recipe described how to launch a web interface that will help in easily exploring Kubernetes instances, such as pods, replication controllers, and services without the kubectl command. Please refer to following recipes on how to get detailed information via the kubectl command.

  • The Working with pods, Working with a replication controller, and Working with services recipes in Chapter 2, Walking through Kubernetes Concepts
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset