Skip to content

Instantly share code, notes, and snippets.

@dnaprawa
Last active March 5, 2024 20:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dnaprawa/52b5ed9af014626764afda5be6de2a34 to your computer and use it in GitHub Desktop.
Save dnaprawa/52b5ed9af014626764afda5be6de2a34 to your computer and use it in GitHub Desktop.
Kubernetes Dashboard with Metrics Server

Install Kubernetes Dashboard

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

Patch the dashboard to allow skipping login

kubectl patch deployment kubernetes-dashboard -n kubernetes-dashboard --type 'json' -p '[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--enable-skip-login"}]'

Install Metrics Server

kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.4.2/components.yaml

Patch the metrisc server to work with insecure TLS

kubectl patch deployment metrics-server -n kube-system --type 'json' -p '[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--kubelet-insecure-tls"}]'

Run the Kubectl proxy to allow accessing the dashboard

kubectl proxy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment