in DevOps

Managing Users In Kubernetes

In a short video, I have shown how to create a normal user in Kubernetes, the used commands during that video are shown below, I’m also including the link to the video for reference.


openssl genrsa -out david.key 204 openssl req -new -key david.key -out david.csr -config request.csr cat david.csr | base64 | tr -d "\n" vim create-user.yaml : set nowrap kubectl apply -f create-user.yaml kubectl certificate approve david kubectl get csr david -o jsonpath='{.status.certificate}' kubectl get csr david -o jsonpath='{.status.certificate}' | base64 --decode > david.crt cat david.crt kubectl create role developer --verb=create --verb=get --verb=list --verb=update --verb=delete --resource=pods kubectl create rolebinding developer-binding-david --role=developer --user=david kubectl config set-credentials david --client-key=./david.key --client-certificate=./david.crt --embed-certs=true kubectl config set-context david --cluster=kubernetes --user=david kubectl config use-context david kubectl config current-context kubectl auth can-i create deployment kubectl get pods
Code language: PHP (php)

Share your thoughts