- Prerequisites
- Step 1 - Install Kubernetes dashboard
- Step 2 - Create service Account
- Step 3 - Geting a bearer token
- Step 4 - Set port-forwarding
- Step 5 - Create Kubernetes test resorce Eg. pod with log 100mb
- Reference
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.6.1/aio/deploy/recommended.yaml
Check release support K8s version: https://github.com/kubernetes/dashboard/releases
cat <<EOF |kubectl apply -f -
apiVersion: v1
kind: ServiceAccount
metadata:
name: admin-user
namespace: kubernetes-dashboard
EOF
cat <<EOF |kubectl apply -f -
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
EOF
kubectl -n kubernetes-dashboard create token admin-user
kubectl proxy
Dashboard available at : http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/aio/test-resources/100mb-of-logs-pod.yaml