How to Set Up Kubernetes Dashboard
The Kubernetes Dashboard is a web-based UI that gives you a visual overview of your cluster. It lets you manage workloads, view logs, and troubleshoot applications without touching the command line. This guide walks you through deploying the dashboard on your Breeze-hosted Kubernetes cluster.
Prerequisites
- A running Kubernetes cluster on your Breeze instance (v1.24 or later recommended)
kubectlconfigured and connected to the cluster- Cluster-admin privileges for the initial setup
Deploying the Dashboard
Apply the official dashboard manifest from the Kubernetes project:
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.7.0/aio/deploy/recommended.yaml
This creates the kubernetes-dashboard namespace along with all required Deployments, Services, and RBAC resources.
Creating an Admin Service Account
To log in to the dashboard you need a bearer token. Create a service account and bind it to the cluster-admin role:
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: ServiceAccount
metadata:
name: dashboard-admin
namespace: kubernetes-dashboard
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: dashboard-admin-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: dashboard-admin
namespace: kubernetes-dashboard
EOF
Retrieving the Bearer Token
Generate a token for the service account:
kubectl -n kubernetes-dashboard create token dashboard-admin
Copy the output — you will paste it into the dashboard login screen.
Accessing the Dashboard
Start the kubectl proxy on your Breeze instance:
kubectl proxy --address='0.0.0.0' --port=8001 --accept-hosts='.*'
Then open your browser and navigate to:
http://your-breeze-ip:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/
Select Token, paste the bearer token, and click Sign in.
Securing the Dashboard
For production Breeze clusters, avoid exposing the proxy publicly. Instead, use SSH port-forwarding from your local machine:
ssh -L 8001:127.0.0.1:8001 root@your-breeze-ip
Then access the dashboard at http://localhost:8001/.... Consider adding TLS termination via an Ingress controller for team-wide access, and always restrict the service account permissions to the minimum necessary for your use case.