Share via


(DEPRECATED) Using the Kubernetes web UI with Azure Container Service

Tip

For the updated version this article that uses Azure Kubernetes Service, see Access the Kubernetes web dashboard in Azure Kubernetes Service (AKS).

Warning

The Azure Container Service (ACS) is being deprecated. No new features or functionality are being added to ACS. All of the APIs, portal experience, CLI commands and documentation are marked as deprecated.

In 2017, we introduced Azure Kubernetes Service (AKS) for simplifying Kubernetes management, deployment, and operations. If you use the Kubernetes orchestrator, please migrate to AKS by January 31, 2020. To get started, see migrate to Azure Kubernetes Service.

For more information, see the Azure Container Service deprecation announcement on Azure.com.

Prerequisites

This walkthrough assumes that you have created a Kubernetes cluster using Azure Container Service.

It also assumes that you have the Azure CLI and kubectl tools installed.

You can test if you have the az tool installed by running:

az --version

If you don't have the az tool installed, there are instructions here.

You can test if you have the kubectl tool installed by running:

kubectl version

If you don't have kubectl installed, you can run:

az acs kubernetes install-cli

Overview

Connect to the web UI

You can launch the Kubernetes web UI by running:

az acs kubernetes browse -g [Resource Group] -n [Container service instance name]

This should open a web browser configured to talk to a secure proxy connecting your local machine to the Kubernetes web UI.

Create and expose a service

  1. In the Kubernetes web UI, click Create button in the upper right window.

    Kubernetes Create UI

    A dialog box opens where you can start creating your application.

  2. Give it the name hello-nginx. Use the nginx container from Docker and deploy three replicas of this web service.

    Kubernetes Pod Create Dialog

  3. Under Service, select External and enter port 80.

    This setting load-balances traffic to the three replicas.

    Kubernetes Service Create Dialog

  4. Click Deploy to deploy these containers and services.

    Kubernetes Deploy

View your containers

After you click Deploy, the UI shows a view of your service as it deploys:

Kubernetes Status

You can see the status of each Kubernetes object in the circle on the left-hand side of the UI, under Pods. If it is a partially full circle, then the object is still deploying. When an object is fully deployed, it displays a green check mark:

Kubernetes Deployed

Once everything is running, click one of your pods to see details about the running web service.

Kubernetes Pods

In the Pods view, you can see information about the containers in the pod as well as the CPU and memory resources used by those containers:

Kubernetes Resources

If you don't see the resources, you may need to wait a few minutes for the monitoring data to propagate.

To see the logs for your container, click View logs.

Kubernetes Logs

Viewing your service

In addition to running your containers, the Kubernetes UI has created an external Service which provisions a load balancer to bring traffic to the containers in your cluster.

In the left navigation pane, click Services to view all services (there should be only one).

Kubernetes Services

In that view, you should see an external endpoint (IP address) that has been allocated to your service. If you click that IP address, you should see your Nginx container running behind the load balancer.

nginx view

Resizing your service

In addition to viewing your objects in the UI, you can edit and update the Kubernetes API objects.

First, click Deployments in the left navigation pane to see the deployment for your service.

Once you are in that view, click on the replica set, and then click Edit in the upper navigation bar:

Kubernetes Edit

Edit the spec.replicas field to be 2, and click Update.

This causes the number of replicas to drop to two by deleting one of your pods.