notes k8s dashboard ,k3spart2-cluster info ,deployment,nginxbased image


kubernetes dashboard -





svc and cluster role,

Version: v1

kind: ServiceAccount

metadata:

  name: admin-user

  namespace: kube-system

---

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: kube-system

~                       

after that kubectl apply -f .

to create a token 

  kubectl -n kube-system  create token admin-user



run

curl -sfL https://get.k3s.io | sh -
k3s,

after successfully installation  to check status

sudo systemctl status k3s
you can also try 
kubectl get all
kubectl get cluser-info
kubectl get node
kubectl get deployemnt 





now to test the cluster  we try to dep nginx dep

 kubectl create deployment  nginx-deployment --image nginx --replicas 2

 kubectl get deployment nginx-deployment

 kubectl get svc nginx-deployment








Comments

Popular Posts