Deploy kubernetes-dashboard on Qovery manages EKS cluster

Hello,
I’m trying to deploy a kubernetes-dashboard on our Qovery managed AWS EKS cluster:

https://console.qovery.com/organization/5fafa1c2-689c-4a54-8ea1-533a7230a2a5/project/e5f54e05-dec9-485d-a668-0b7c2c3654ab/environment/837ce2e4-b80b-4f05-b2a7-0b3235039fc3/services/general

of course when I click on the URL link to the k8s-dashboard, I get this message:

400 Bad Request

The plain HTTP request was sent to HTTPS port

Can you create a tutorial on how to set up a kubernetes-dashboard on a Qovery managed AWS EKS cluster?

  1. I install the Helm chart on the Qovery managed EKS cluster:
  1. I try to set up the port forwarding:

  1. Additionally, once access to the k8s-dashboard has been established through a URL, I’m not too sure how to generate the k8s-dashboard bearer token in Qovery. I’m able to do this using kubectl attached to a plain vanilla AWS EKS cluster.

Can you create a tutorial on how to install the kubernetes-dashboard on a Qovery managed AWS EKS cluster? Thanks!

ps. - I searched the forum and the closest topic to this was: Exposing Kubecost Dashboard via URL?

Hi @data_admin ,

I’ll help you there to get your dashboard. First of all, in the documentation, it’s discouraged to expose your dashboard publicly. So I encourage you to delete the public exposed port you’ve created on Qovery.

Following the documentation, you have to create this barear token. In order to do it, you’ll have to:

  1. Get a kubernetes access. If you don’t have access to your Kubernetes cluster today, you need your kubeconfig, you can get it with the CLI (if you have the permissions):
    1.1. List your clusters to get the ID: qovery cluster list
    1.2 Retrieve your kubeconfig file: qovery cluster kubeconfig --cluster-id xxxx

Note: do not forget to have the AWS env vars set and the CLI installed, or you won’t be able to establish a connection to your cluster.

  1. Create permissions file and replace the namespace with the one of your environment (it can be found in the variables and named QOVERY_KUBERNETES_NAMESPACE_NAME) in a file (dashboard-adminuser.yaml):
apiVersion: v1
kind: ServiceAccount
metadata:
  name: admin-user
  namespace: <set your namespace here>
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: admin-user
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: cluster-admin
subjects:
  - kind: ServiceAccount
    name: admin-user
    namespace: <set your namespace here>

Now apply it:

kubectl apply -f dashboard-adminuser.yaml

Finally, get a token (will be displayed on the output):

kubectl -n kubernetes-dashboard create token admin-user

At this point, your installation is done and you don’t need anymore to have access to your Kubernetes cluster with kubectl.

From the Qovery console, in your environment overview, you should see your pods. Take the name of the Kong one (ex: helm-zef6ea651-ks-dash-kong-9b4859c66-b9gr6) and run this command to create a port forward:

qovery port-forward -p 8443:8443 --pod <set your pod name here>

Check everything is ok and type yes to validate connection.

Leave it open and open your web browser at https://127.0.0.1:8443. Paste the token and the magic will happen :slight_smile:

Thanks for the tutorial! I will give it a try.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.