v2-s.jpg

configure

[root@test ~]# aws configure
AWS Access Key ID [None]: AAAAAAAAAAAAAAAAAAAAAA
AWS Secret Access Key [None]: BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
Default region name [None]: ap-east-1
Default output format [None]: json

sts get identity

[root@test ~]# aws sts get-caller-identity
{
    "UserId": "111111111111111111111111111111",
    "Account": "111111111111111111111111111111",
    "Arn": "arn:aws:iam::111111111111111111111111111111:root"
}

get kubectl config

[root@test ~]# aws eks --region ap-east-1 update-kubeconfig --name youk8sname
Added new context arn:aws:eks:ap-east-1:111111111111111111111111111111:cluster/youk8sname to /root/.kube/config

test

[root@test ~]# kubectl get svc
NAME         TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE
kubernetes   ClusterIP   10.100.0.1   <none>        443/TCP   36m
[root@test ~]# kubectl get nodes
No resources found

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code