Docs
  • StakePool
  • Avail
    • RPC
    • Faucet
    • Live Peers
    • Snapshots
      • Avail
  • Namada
    • RPC
    • Live Peers
    • Snapshots
      • Namada
  • Polygon
    • Binaries
      • Run a Node
      • Monitoring Grafana
      • Alert Message Api
      • Monitoring Blocks Heimdall and Bor
      • Monitoring logs
    • Kubernetes
      • Technical documentation
      • control pane cluster
      • worker cluster
      • Run a node
      • Files
      • Access the Kubernetes Dashboard
      • Access the Kubernetes Dashboard Grafana
      • Monitoring logs
    • Erigon
      • Run a Node
    • Snapshots
      • Polygon
    • Scripts
      • Block Hash
      • Bor Status
      • Checkpoint Notifier
      • Checkpoint with prometheus
      • Manage Bor
      • Peer Delivering
      • Polygon Validator Participation Analyzer
      • Rpc Update
      • Span Participation
    • RPC
    • Faucet
    • Live Peers
Powered by GitBook
On this page
  • Deploy and Access the Kubernetes Dashboard
  • Deploying the Dashboard UI
  • Accessing the Dashboard UI
  • Creating a Service Account
  • Creating a ClusterRoleBinding
  • Getting a Bearer Token for ServiceAccount
  • Accessing Dashboard
  1. Polygon
  2. Kubernetes

Access the Kubernetes Dashboard

PreviousFilesNextAccess the Kubernetes Dashboard Grafana

Last updated 7 months ago

Deploy and Access the Kubernetes Dashboard

Dashboard is a web-based Kubernetes user interface. Provides information on the state of Kubernetes resources in your cluster and on any errors that may have occurred.

Deploying the Dashboard UI

The Dashboard UI is not deployed by default. To deploy it, run the following command:

sudo kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.7.0/aio/deploy/recommended.yaml

After completing the installation, your pod must be running successfully.

Now, to be able to expose the dashboard for external access, we need to change the service's ClusterIP type to NodePort.

We can make this change simply by editing the service.

sudo kubectl edit service kubernetes

After making the change to NodePort, save and close the file.

When performing a new query, notice that the type has changed and now a new port has been added.

Once this is done, you should have access to the dashboard through the public IP of your instance plus the port that was released.

As we send an http request and expect https then we receive an alert. We can simply move forward by adding https://

Accessing the Dashboard UI

Creating sample user: Grant this user admin permissions and login to Dashboard using a bearer token tied to this user.

Creating a Service Account

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

Creating a ClusterRoleBinding

We can use it and create only a ClusterRoleBinding for our ServiceAccount

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: kubernetes-dashboard

Getting a Bearer Token for ServiceAccount

Execute the following command:

sudo kubectl -n kubernetes-dashboard create token admin-user

Accessing Dashboard

Now we can navigate the dashboard and monitor all clusters.