Skip to content

Instantly share code, notes, and snippets.

@turkenh
Created April 25, 2023 09:53
Show Gist options
  • Save turkenh/e2161900871deb681c771ee722ea35b3 to your computer and use it in GitHub Desktop.
Save turkenh/e2161900871deb681c771ee722ea35b3 to your computer and use it in GitHub Desktop.

Installing metrics and Kubernetes dashboard on Kind

Install Metrics Server:

  1. Install latest metrics server:
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
  1. Configure for kind:
kubectl patch -n kube-system deployment metrics-server --type=json \
  -p '[{"op":"add","path":"/spec/template/spec/containers/0/args/-","value":"--kubelet-insecure-tls"}]'

Install Kubernetes Dashboard

  1. Install Kubernetes Dashboard
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.7.0/aio/deploy/recommended.yaml
  1. Create token
echo "apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: dashboard-clusterrolebinding
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: cluster-admin
subjects:
  - kind: ServiceAccount
    name: kubernetes-dashboard
    namespace: kubernetes-dashboard" | kubectl apply -f -
kubectl -n kubernetes-dashboard create token kubernetes-dashboard --duration 6000m
  1. Access
kubectl proxy

Go to http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/

Provide the token in the previous step.

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