Kubernetes
GKE
Kubernetes Dashboard
Cloud Management
Google Cloud

How to update Kubernetes Dashboard in hosted Kubernetes on GKE?

System Design practice on Codemia

Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.

Practice system design

Introduction

Updating Kubernetes Dashboard on GKE is mostly about deploying a compatible dashboard manifest and controlling access safely. Managed clusters reduce node management work, but addon behavior can vary by cluster mode and version. A deliberate upgrade process helps you avoid broken authentication or overly permissive permissions.

Confirm Cluster and Dashboard State

Start by checking your cluster version, namespace resources, and existing dashboard deployment. Knowing what is currently installed prevents accidental duplicate services and confusing ingress behavior.

bash
1gcloud container clusters describe my-cluster   --region us-central1   --format="value(currentMasterVersion)"
2
3kubectl get ns
4kubectl -n kubernetes-dashboard get deploy,svc,sa,secret

If your cluster already has dashboard components, review image tags and compare them with the target release. Do not apply unrelated manifests from random blogs. Use the official dashboard release manifest for a predictable upgrade path.

Apply a Target Dashboard Version

Download the official recommended YAML for the version you want, then apply it. In production, pin the release tag instead of using floating latest links.

bash
1export DASHBOARD_VERSION=v2.7.0
2
3kubectl apply -f   "https://raw.githubusercontent.com/kubernetes/dashboard/${DASHBOARD_VERSION}/aio/deploy/recommended.yaml"
4
5kubectl -n kubernetes-dashboard rollout status deploy/kubernetes-dashboard
6kubectl -n kubernetes-dashboard get pods -o wide

If rollout fails, inspect pod events and logs before retrying. Repeated blind applies can hide root causes such as image pull issues or policy denials.

Access and Authentication Setup

For quick admin access in a controlled environment, create a service account and bind an appropriate role. In shared environments, prefer a limited role instead of full cluster admin.

yaml
1apiVersion: v1
2kind: ServiceAccount
3metadata:
4  name: dashboard-reader
5  namespace: kubernetes-dashboard
6---
7apiVersion: rbac.authorization.k8s.io/v1
8kind: ClusterRoleBinding
9metadata:
10  name: dashboard-reader-binding
11roleRef:
12  apiGroup: rbac.authorization.k8s.io
13  kind: ClusterRole
14  name: view
15subjects:
16  - kind: ServiceAccount
17    name: dashboard-reader
18    namespace: kubernetes-dashboard
bash
kubectl apply -f dashboard-rbac.yaml
kubectl -n kubernetes-dashboard create token dashboard-reader
kubectl -n kubernetes-dashboard port-forward svc/kubernetes-dashboard 8443:443

Open https://localhost:8443 and sign in with the token. Avoid exposing the dashboard publicly unless you also enforce strong identity and network controls.

Operational Checks After Upgrade

After deployment, verify that dashboards can list resources expected by the assigned role and cannot view forbidden namespaces. Test common read paths such as workloads, logs, and events. Then document the exact manifest tag, RBAC objects, and access method used by your team.

Add dashboard checks to your platform runbook. During future cluster upgrades, include dashboard compatibility checks in the same change window to avoid surprise breakage.

For teams using GitOps, commit dashboard manifests and RBAC resources in source control with explicit version tags. Promotion through environments then becomes auditable and repeatable, and rollbacks are much faster when a dashboard image or API change introduces a regression.

Common Pitfalls

A common mistake is granting cluster admin rights to every dashboard user account. It is convenient in development but risky in shared clusters. Use least privilege roles by default, and review bindings quarterly with your platform security checklist.

Another issue is relying on outdated dashboard manifests that do not match current API versions. This can break deployment or create warning noise that hides real failures.

Teams also forget to rotate dashboard tokens and treat them like permanent credentials. Tokens should follow the same lifecycle controls as other privileged access secrets.

Finally, exposing dashboard through an external load balancer without strict authentication and network policy is a major security risk. Prefer private access paths such as port forwarding or secured identity aware proxies.

Summary

  • Check current cluster and dashboard resources before upgrading.
  • Deploy a pinned official dashboard release manifest.
  • Use scoped RBAC roles instead of defaulting to cluster admin.
  • Validate both functionality and access restrictions after rollout.
  • Keep dashboard access private unless strong security controls are in place.

Related reading
Course
Beginner
27 lessons
10 hours
System Design Fundamentals

Build a strong foundation in designing scalable, reliable distributed systems.

View the course
Track what you have practised

A free account saves your progress, solutions and study plan across every problem on Codemia.

System Design practice on Codemia

Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.

Practice system design

All Rights Reserved.