Eks
To add other roles to access EKS cluster other than the one who created it, add the user/role as master in the cluster.
apiVersion: v1
kind: ConfigMap
metadata:
name: aws-auth
namespace: kube-system
data:
mapRoles: |
- rolearn: arn:aws:iam::428561211631:role/PHC-IT-EKS-NG-01-NodeInstanceRole-19W8Q1BTI0P3B
username: system:node:{{EC2PrivateDNSName}}
groups:
- system:bootstrappers
- system:nodes
- rolearn: arn:aws:iam::428561211631:role/ROLE-PHC-POC-SB-03-SB-AWSADM
username: ROLE-PHC-POC-SB-03-SB-AWSADM
groups:
- system:masters
A user or role can be directly given permission to administrator the cluster by editing the configmap:
kubectl edit configmap -n kube-system aws-auth