I am trying to understand where do these username field is mapped to in the Kubernetes cluster.
This is a sample configmap:
apiVersion: v1
data:
mapRoles: |
- rolearn: arn:aws:iam::111122223333:role/eksctl-my-cluster-nodegroup
username: system:node:{{EC2PrivateDNSName}}
groups:
- system:bootstrappers
- system:nodes
mapUsers: |
- userarn: arn:aws:iam::111122223333:user/admin
username: admin
groups:
- system:masters
- userarn: arn:aws:iam::444455556666:user/ops-user
username: ops-user
groups:
- eks-console-dashboard-full-access-group
If I change the username from
system:node:{{EC2PrivateDNSName}}
to something likemynode:{{EC2PrivateDNSName}}
does it really make any difference? Does It make any sense to the k8's cluster by adding thesystem:
prefix ?.And where can I see these users in k8's. Can I query it using
kubectl
just likek get pods
, askubectl get usernames
. Is it a dummy user name we are providing to map with or does it hold any special privileges.From where do these names
{{EC2PrivateDNSName}}
comes from. Are there any other variables available? I can't see any information related to this from the documentation.
Thanks in advance!