Skip to content

Latest commit

 

History

History
60 lines (59 loc) · 2.09 KB

README.md

File metadata and controls

60 lines (59 loc) · 2.09 KB

Deploy and Access the Kubernetes Dashboard

Table of contents

Prerequisites

  1. Install cluster

Step 1 - Install Kubernetes dashboard

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

Step 2 - Create service Account

cat <<EOF |kubectl apply -f -
apiVersion: v1
kind: ServiceAccount
metadata:
  name: admin-user
  namespace: kubernetes-dashboard
EOF

Step 3 - Creating a ClusterRoleBinding

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

Step 3 - Getting a Bearer Token

kubectl -n kubernetes-dashboard create token admin-user

Step 4 - Set port-forwarding

kubectl proxy

Dashboard available at : http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/

Step 5 - Create Kubernetes test resorce Eg. pod with log 100mb

kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/aio/test-resources/100mb-of-logs-pod.yaml

Reference