EKS Cluster
kubectl create ns devops
kubectl apply -f deployment.yml
aws sts get-caller-identity
vi rbacuser_creds.sh
provide details and save file
kubectl get configmaps aws-auth -n kube-system
kubectl edit configmaps aws-auth -n kube-system
--------------------------------------------------------
mapUsers: |
- userarn: arn:aws:iam::601279438670:user/naresh
username: naresh
--------------------------------------------------------
A role in Kubernetes RBAC defines what you will do to a group of resources. It contains a group of rules which define a set of permission.
Here’s an example Role within the “default” namespace that can be used to grant read access to pods:
kubectl apply -f rbacuser-role.yaml
kubectl apply -f rbacuser-role-binding.yaml
. rbacuser_creds.sh
aws sts get-caller-identity
kubectl get pods
It will through some error
kubectl get pods -n devops