-
-
Save saisumit/e66e9300f5594e3bfae5bba9e756d12d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.7.0/aio/deploy/recommended.yaml | |
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: admin-user | |
namespace: kubernetes-dashboard | |
--- | |
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 | |
kubectl apply -f dashboard-adminuser.yaml | |
kubectl -n kubernetes-dashboard create token admin-user | |
kubectl -n kubernetes-dashboard edit service kubernetes-dashboard | |
kubectl -n kubernetes-dashboard get services | |
sudo yum install -y git | |
git clone https://github.com/kubernetes-csi/csi-driver-host-path.git | |
cd csi-driver-host-path/deploy/kubernetes-1.27 | |
./deploy.sh | |
Next, create a storage class sc-hostpath.yaml | |
apiVersion: storage.k8s.io/v1 | |
kind: StorageClass | |
metadata: | |
annotations: | |
storageclass.kubernetes.io/is-default-class: "true" | |
name: csi-hostpath-sc | |
provisioner: hostpath.csi.k8s.io | |
reclaimPolicy: Delete | |
volumeBindingMode: Immediate | |
allowVolumeExpansion: true | |
kubectl apply -f sc-hostpath.yaml | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment