Kubernetes Dashboard on Nutanix Karbon


Userlevel 2
Badge
With the release of Nutanix Karbon TP, PC 5.9, you may want to deploy some of the traditional addons like Kubernetes Dashboard with Heapster.

This post walks you through the process to successfully deploy the Kubernetes Dashboard addon.

Before you can start with the deployment of the addon you need a working Kubernetes cluster and the kubectl CLI-tool.

The steps to follow are:
  1. Deploy Heapster
  2. Deploy Kubernetes Dashboard
  3. Connect to Kubernetes Dashboard

Deploying Heapster

From Heapster website:

Heapster enables Container Cluster Monitoring and Performance Analysis for Kubernetes (versions v1.0.6 and higher), and platforms which include it.

Heapster is deprecated. Consider using metrics-server and a third party metrics pipeline to gather Prometheus-format metrics instead. See the deprecation timeline for more information on support.

The reason of using Heapster is because:

Currently only Heapster integration is supported with Kubernetes Dashboard, however there are plans to introduce integration framework to Dashboard. It will allow to support and integrate more metric providers as well as additional applications such as Weave Scope or Grafana.

To deploy Heapster, execute following commands:
  • Clone the Heapster GitHub repo
  • Move to the InfluxDB directory
code:
          cd heapster/deploy/kube-config/influxdb
  • Deploy InfluxDB
code:
          kubectl create -f influxdb.yaml
  • Replace the source value for the heapster.yaml manifest file from --source=kubernetes:https://kubernetes.default with --source=kubernetes.summary_api:''
code:
          command:
- /heapster
- --source=kubernetes.summary_api:''
- --sink=influxdb:http://monitoring-influxdb.kube-system.svc:8086
  • Deploy Heapster
code:
          kubectl create -f heapster.yaml
  • Check Heapster is running
code:
          kubectl get -f heapster.yaml
NAME SECRETS AGE
serviceaccount/heapster 1 50m

NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
deployment.extensions/heapster 1 1 1 1 50m

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/heapster ClusterIP 172.19.173.162 80/TCP 50m




Deploying Kubernetes Dashboard

From Kubernetes Dashboard website:

Kubernetes Dashboard is a general purpose, web-based UI for Kubernetes clusters. It allows users to manage applications running in the cluster and troubleshoot them, as well as manage the cluster itself.

To deploy Dashboard, execute following command:




Connecting to Kubernetes Dashboard

To access Dashboard from your local workstation you must create a secure channel to your Kubernetes cluster. Run the following command:
code:
kubectl proxy




Now access Dashboard at:




If you would like to access the Dashboard without use the proxy, you can use the following URL. Make sure you don't use Chrome because you will get a certificate warning and the Dashboard won't work. I recommend for the Dashboard you use Firefox. Make sure you replace localhost with your Kubernetes Master address.

Now access Dashboard at (credentials: admin / nutanix/4u ):
code:
https:// < master_address > /api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/



Congratulations! now you have a Kubernetes Dashboard with Heapster up and running.


4 replies

Userlevel 4
Badge +20
Great work, if your trying to figure out your master ip you can use prism to grab the IP or use kubectl cluster-info
Badge +1
Hi,

How did you enable a username/password for credentials to hit the secure URL for the dashboard. From my testing with the dashboard, it always prompts for a kubeconfig file or token given it only has the concepts of service accounts - I am not able to get it to work to prompt me for a user/password. I didn't deploy Heapster, just the dashboard for the moment. Jut curious if there is something I might be missing. thanks!

-Keith
Userlevel 2
Badge
echolaughmk wrote:

Hi,

How did you enable a username/password for credentials to hit the secure URL for the dashboard. From my testing with the dashboard, it always prompts for a kubeconfig file or token given it only has the concepts of service accounts - I am not able to get it to work to prompt me for a user/password. I didn't deploy Heapster, just the dashboard for the moment. Jut curious if there is something I might be missing. thanks!

-Keith



This is due to changes on the latest version of Kubernetes Dashboard. On this latest version you will need to get the token running the following commands:
  1. kubectl -n kube-system get secret
  2. Look for the kubernetes-dashboard-token
  3. kubectl -n kube-system describe secret kubernetes-dashboard-token-
  4. Copy the token and paste it in the K8s Dashboard website.
Let me know if this works for you.

-Jose Gomez
Badge +1
Thanks Jose,

That did work when I was testing. I thought maybe I was missing something on the user/passwd and I wanted to validate since getting into the dashboard has become locked down with the later versions and RBAC.....was hoping I was missing something to make life easier. Thanks for the quick response and update to the post! I'll continue on with my testing.

Regards,

-Keith

Reply