By using AWS re:Post, you agree to the AWS re:Post Terms of Use

How do I set up a Kubernetes Dashboard on an Amazon EKS cluster?

2 minute read
0

I want to set up a Kubernetes Dashboard on an Amazon Elastic Kubernetes Service (Amazon EKS) cluster.

Resolution

Before you complete the resolution steps, you must have the following:

  • An Amazon Elastic Compute Cloud (Amazon EC2) instance or user system with kubectl and helm binaries.
  • A configured kubeconfig file that points to the correct Amazon EKS cluster. For more information, see Create kubeconfig file automatically.

Deploy the Kubernetes Dashboard

To deploy the Kubernetes Dashboard on the Amazon EKS cluster, run the following command:

$ DASHBOARD_VERSION="7.4.0"
$ helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard/

$ kubectl create ns kubernetes-dashboard
$ helm upgrade --install kubernetes-dashboard kubernetes-dashboard/kubernetes-dashboard --namespace kubernetes-dashboard --version ${VERSION}

Note: Replace DASHBOARD_VERSION with the appropriate Kubernetes Dashboard release tag value.

For more information about how to deploy the Kubernetes Dashboard, see Deploying the Dashboard UI on the Kubernetes website. To check the latest available release tags, see the Kubernetes Dashboard release page on the GitHub website.

Access the Kubernetes Dashboard UI

To access the Kubernetes Dashboard UI, complete the following steps:

  1. Route all requests from the Amazon EC2 instance's local port to the Kubernetes Dashboard service port. To turn on port forwarding, run the following command:
    $ kubectl -n kubernetes-dashboard port-forward svc/kubernetes-dashboard-kong-proxy 8443:443 --address Amazon_EC2_Private_IP
    Note: Replace Amazon_EC2_Private_IP with your Amazon EC2 instance's private IP address.
  2. To access the Kubernetes Dashboard, use the following address: https://Amazon_EC2_Public_IP:8443
  3. When prompted, enter a token or kubeconfig file.
  4. To get a bearer token for authentication on the Kubernetes Dashboard login page, run the following command from your local computer terminal:
    $ aws eks get-token --cluster-name ClusterName --region Region | jq -r '.status.token'
    Note: Replace ClusterName and Region with your cluster name and AWS Region.
  5. Copy the token from the terminal output.
  6. In the browser's Kubernetes Dashboard login page pop-up window, choose Token. Enter the copied token into the Enter Token box.
  7. Choose Sign in to access the Kubernetes Dashboard in your browser.

Related information

Kubernetes Dashboard on the GitHub website

AWS OFFICIAL
AWS OFFICIALUpdated 5 months ago
2 Comments

Please update this article for kubernetes-dashboard-7.4.0

replied 6 months ago

Thank you for your comment. We'll review and update the Knowledge Center article as needed.

profile pictureAWS
MODERATOR
replied 6 months ago