Simplified Deployment of Kubernetes Dashboard with ALB Ingress Controller

Suraj Solanki
5 min readJul 31, 2023

Kubernetes Dashboard is a powerful web-based user interface that allows users to manage and monitor Kubernetes clusters. While the dashboard provides a user-friendly experience, exposing it securely and efficiently to users outside the cluster can be challenging. In this blog, we will explore how to deploy the Kubernetes Dashboard using an Application Load Balancer (ALB) Ingress Controller, providing a seamless and secure way to access the dashboard from the internet.


  1. A running Kubernetes cluster with kubectl configured to access the cluster.
  2. AWS CLI was installed and configured with appropriate permissions to create ALB resources.

Step 1: Install Kubernetes Dashboard

Before deploying the Kubernetes Dashboard, ensure that it is installed in your Kubernetes cluster. If not already installed, you can use the following kubectl command:

 kubectl apply -f

Step 2: Accessing Dashboard

We will create a new user using the Service Account mechanism of Kubernetes, grant this user admin permissions, and log in to Dashboard using a bearer token tied to this user

cat > service-role.yaml << EOF

apiVersion: v1
kind: ServiceAccount
name: admin-user
namespace: kubernetes-dashboard


kind: ClusterRoleBinding
name: admin-user
kind: ClusterRole
name: cluster-admin # name: view if read only user required
- kind: ServiceAccount
name: admin-user
namespace: kubernetes-dashboard


apiVersion: v1
kind: Secret
name: admin-user
namespace: kubernetes-dashboard
annotations: "admin-user"


kubectl apply -f service-role.yaml

Step 3: Deploy ALB Ingress Controller

We need to deploy the ALB Ingress Controller to manage the incoming traffic and route it to the Kubernetes Dashboard service. Follow these steps to deploy the ALB Ingress Controller:

Step 1: Download the IAM policy for the ALB Ingress Controller:

curl -O

Step 2: Create an IAM policy using AWS CLI:

aws iam create-policy policy-name AWSLoadBalancerControllerIAMPolicy policy-document file://iam_policy.json

Step 3: Retrieve OIDC ID and create an IAM role for the ALB Ingress Controller:

Step 1: 

oidc_id=$(aws eks describe-cluster - name my-cluster - query "cluster.identity.oidc.issuer" - output text | cut -d '/' -f 5)

Step 2:

aws iam list-open-id-connect-providers | grep $oidc_id | cut -d "/" -f4

Step 3:

cat >load-balancer-role-trust-policy.json <<EOF
"Version": "2012-10-17",
"Statement": [
"Effect": "Allow",
"Principal": {
"Federated": "arn:aws:iam::<account-id>:oidc-provider/<oidc-id>"
"Action": "sts:AssumeRoleWithWebIdentity",
"Condition": {
"StringEquals": {
"<oidc_id>:aud": "",
"<oidc_id>:sub": "system:serviceaccount:kube-system:aws-load-balancer-controller"

Step 4:

aws iam create-role \
--role-name AmazonEKSLoadBalancerControllerRole \
--assume-role-policy-document file://"load-balancer-role-trust-policy.json"

Step 5:

aws iam attach-role-policy \
--policy-arn arn:aws:iam::<account-id>:policy/AWSLoadBalancerControllerIAMPolicy \
--role-name AmazonEKSLoadBalancerControllerRole

Step 4: Create a Kubernetes service account for the ALB Ingress Controller:

cat >aws-load-balancer-controller-service-account.yaml <<EOF
apiVersion: v1
kind: ServiceAccount
labels: controller aws-load-balancer-controller
name: aws-load-balancer-controller
namespace: kube-system
annotations: arn:aws:iam::<account-id>:role/AmazonEKSLoadBalancerControllerRole

kubectl apply -f aws-load-balancer-controller-service-account.yaml

Step 5: Installing Helm Helm is a package manager for Kubernetes that simplifies application deployment.

$ curl -fsSL -o
$ chmod 700
$ ./

Step 6: Install AWS Load Balancer Controller using Helm V3:

Step 1:

helm repo add eks

Step 2:

helm repo update eks

Step 3:

helm install aws-load-balancer-controller eks/aws-load-balancer-controller \
-n kube-system \
--set clusterName=<Cluster-Name> \
--set serviceAccount.create=false \

Verify that the controller is installed

kubectl get deployment -n kube-system aws-load-balancer-controller

Step 7: Deploy ALB Ingress Class: Create an ALB Ingress Class to manage Ingress resources for the AWS Load Balancer Controller.

cat > ALBIngressClass.yaml <<EOF

kind: IngressClass
name: alb-aws-ingress-class
annotations: "true"


Kubectl apply -f ALBIngressClass.yaml

Step 8: Create ALB Ingress Resource for Kubernetes-dashboard: Create an ALB Ingress resource specifically for the Kubernetes Dashboard, defining the necessary annotations for ALB settings.

cat > dashboard-ingress.yaml <<EOF

kind: Ingress
annotations: '{"Type": "redirect", "RedirectConfig":
{ "Protocol": "HTTPS", "Port": "443", "StatusCode": "HTTP_301"}}' HTTPS arn:aws:acm:<region>:<account-id>:certificate/<cert-unique-id> <lb-name>-group "15" traffic-port HTTPS "4" "2" '[{"HTTP": 80}, {"HTTPS":443}]' <lb-name> internal <subnet-id>,<subnet-id> "200" ip "3"
name: <ingress-name>
namespace: kubernetes-dashboard
ingressClassName: alb-aws-ingress-class
- host:
- backend:
name: kubernetes-dashboard
number: 443
path: /
pathType: Prefix
- hosts:
secretName: kubernetes-dashboard-cert


kubectl apply -f dashboard-ingress.yaml

Step 9: Adding ALB’s DNS name to Route53:

To make the Kubernetes Dashboard accessible via a custom DNS name, add the ALB’s DNS name as a DNS record in Route 53.

Follow these steps in the AWS Management Console:

Go to AWS Management Console and open the Route53 console.

  1. Go to “Route53” and select the hosted zone where you want to add the DNS record for the ALB.
  2. Click on “Create Record Set.”
  3. Configure the following settings:
  • Name: Enter the desired subdomain or domain name for the ALB (e.g., “”).
  • Type: Choose “CNAME.”
  • Alias: Set this to “No.”
  • Value: Enter the ALB’s DNS name you retrieved earlier (e.g., “cluster-alb-<account-id>”).
  • TTL (Seconds): Optionally, set the Time To Live (TTL) for the DNS record.

4. Click “Create” to add the DNS record.

After creating the DNS record, Once the changes have propagated, users can access the Kubernetes Dashboard using the custom DNS name you configured (e.g., “”) to securely manage and monitor the Kubernetes cluster.

Step 10: Accessing the Kubernetes Dashboard via DNS Name

Note: To access the Kubernetes dashboard, you need to obtain a valid token or kubeconfig to authenticate and access cluster resources securely.

To get a long-lived Bearer Token for the ServiceAccount, use the following command:

$ kubectl get secret admin-user -n kubernetes-dashboard -o jsonpath={".data.token"} | base64 -d

This command retrieves the Bearer Token associated with the “admin-user” ServiceAccount in the “Kubernetes-dashboard” namespace and decodes it using base64.

Click the Sign in button and that's it. You are now logged in as an admin.


In this blog, we’ve learned how to deploy the Kubernetes Dashboard using an ALB Ingress Controller. By leveraging the ALB, we can securely expose the dashboard to the internet while ensuring efficient load balancing and routing of incoming traffic. Now you can easily manage and monitor your Kubernetes cluster using the user-friendly Kubernetes Dashboard.

Thanks for reading this far, and good luck. I appreciate your comments/feedback.

About The Author
Suraj Solanki
DevOps Engineer — II



Suraj Solanki

Senior DevOps Engineer and Fascinated to learn as well as talk about cloud and automation. You can always connect