How to use a Dashboard on Exoscale SKS
For Kubernetes, there are different user interfaces (UI) available. You can use them to get an overview of your cluster, do basic monitoring, or create/scale individual Kubernetes resources.
This documentation presents two possibilities: The Kubernetes Dashboard, which runs as Web-App on the Cluster itself. And the software Lens, which runs as a standalone application on the computer of the administrator.
If you are new to Kubernetes, we highly recommend to use some kind of UI, as it will help you in finding errors in your deployments more easily. Lens is especially straightforward in this regard.
As a prerequisite for the following documentation, you need:
- A Exoscale SKS Cluster
- Access to your Cluster via kubectl
- Basic Linux knowledge
If you don’t have access to a SKS cluster yet, follow the Quick Start Guide.
Kubernetes Dashboard runs in a cluster as a web application.
You can deploy version 2.2.0 this way:
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.2.0/aio/deploy/recommended.yaml
To get login-credentials (a bearer token) follow the steps linked here.
To access the UI of the dashboard on Exoscale SKS, use port-forwarding:
kubectl port-forward deployment/kubernetes-dashboard 7000:8443 -n kubernetes-dashboard
This will open local port 7000 and forward it to the container of the dashboard.
You can access the dashboard then under https://127.0.0.1:7000/, where you will have to paste in the generated bearer-token of above.
For long-term usage, you potentially want to create an Ingress with Basic Authentification and a TLS Certificate. You then don’t need to use kubectl for accessing the UI anymore.
Lens is easy to install and use, as it runs as a standalone application on your computer and does not require any installation in the cluster itself. It uses your kubeconfig to authenticate against the cluster.
Download Lens from its website: https://k8slens.dev, install and start it.
To add a Cluster, simply click on the plus-icon (+), and select your kubeconfig.
If you want to enable extended metrics (like CPU usage), you need to install the Metrics stack. This can be done automatically: Simply right-click on your cluster in Lens, then go to Settings and click on “Install” at Features/Metrics Stack.
When deploying Applications (Pods, Deployments etc.), you can see potential errors directly in the cluster-overview. It will also show them in the Events-tab and as a warning besides Pods and Deployments. Additionally, you can directly get a shell of containers, or view their logs.
Kubernetes Dashboard - https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/