다른 iam에서 k8s cluster 접근하고 싶으면
kubectl edit -n kube-system configmap/aws-auth
# Please edit the object below. Lines beginning with a '#' will be ignored,
# and an empty file will abort the edit. If an error occurs while saving this file will be
# reopened with the relevant failures.
#
apiVersion: v1
data:
mapUsers: |
- userarn: arn:aws:iam::12341234321123:user/user
username : test
groups:
- system:masters
kind: ConfigMap
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"v1","data":{"mapRoles":"- rolearn: arn:aws:iam::955718581810:role/EKS_CLUSTER_ROLE\n username: system:node:{{EC2PrivateDNSName}}\n groups:\n - system:bootstrappers\n - system:nodes\n"},"kind":"ConfigMap","metadata":{"annotations":{},"name":"aws-auth","namespace":"kube-system"}}
creationTimestamp: "2023-09-08T12:59:59Z"
name: aws-auth
namespace: kube-system
resourceVersion: "12328"
uid: 41254f78-cf2b-4ce5-99a8-635dd29988d9
arn 부분 수정
cli에서 aws 로그인 후
aws eks update-kubeconfig --region ap-northeast-2 --name k8s-cluster
명령어를 써보면

정상 작동 하는 것을 볼 수 있습니다.
'인프라 > AWS' 카테고리의 다른 글
EKS NLB,ALB (0) | 2023.09.14 |
---|---|
EKS 서비스 구축 (0) | 2023.09.13 |
AWS NAT Gateway, NAT Instance (0) | 2023.09.12 |
AWS - EKS 실습 (0) | 2023.09.12 |
AWS Manage Console로 eks 만들었지만 Error from server (NotFound): configmaps "aws-auth" not found 뜨는 경우 (0) | 2023.09.08 |