💻 Tech
Here are some of kubectl commands related to config that I found useful:
kubectl config view- View the current kubeconfig filekubectl config use-context --current --namespace ns1- Set the current namespace ns1 for the current contextkubectl config set-credentials marv --client-certificate=/root/marv.crt- Set the client certificate for an existing user marvkubectl config set-context developer --user=martin --cluster=kubernetes- Create a new context developer with user marv and cluster kubernetes
If you want to verify if a user has access to perform an action on a resource, you can use this: kubectl auth can-i list pods --as=marv -n development