Skip to content

DASHBOARD WITH HELM

Installer la commande helm sur le poste de travail

curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh

Installer le dashboard avec HELM

Aller sur le site https://artifacthub.io/packages/helm/k8s-dashboard/kubernetes-dashboard

Exécuter

Terminal window
helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard/
helm repo update
helm install dashboard kubernetes-dashboard/kubernetes-dashboard
NAME: dashboard
LAST DEPLOYED: Wed Sep 11 10:57:55 2024
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
*************************************************************************************************
*** PLEASE BE PATIENT: Kubernetes Dashboard may need a few minutes to get up and become ready ***
*************************************************************************************************
Congratulations! You have just installed Kubernetes Dashboard in your cluster.
To access Dashboard run:
kubectl port-forward svc/dashboard-kong-proxy 800X:443
NOTE: In case port-forward command does not work, make sure that kong service name is correct.
Check the services in Kubernetes Dashboard namespace using:
kubectl -n default get svc
Dashboard will be available at:
https://localhost:800X

Créer le User

Terminal window
vi user.yml
apiVersion: v1
kind: ServiceAccount
metadata:
name: admin-user

Créer le Role Binding

Terminal window
vi role-binding.yml
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: default

Créer le token Binding

Terminal window
kubectl -n default create token admin-user