aws eks update-kubeconfig
(Redirected from Update-kubeconfig)
Jump to navigation
Jump to search
aws eks update-kubeconfig (doc) configures kubectl (~/.kube/config) so that you can connect to an Amazon EKS cluster.
aws eks list-clusters --output text | awk '{print $2}' | xargs -n1 aws eks update-kubeconfig --name Added new context arn:aws:eks:eu-central-1:0987654321:cluster/production-eks-3yxD5aRA to /Users/my_user/.kube/config
aws eks update-kubeconfig --region us-east-2 --name education-eks-LZIQaQdP Added new context arn:aws:eks:us-east-2:0987654321:cluster/education-eks-LZIQaQdP to /Users/my_user/.kube/config
aws eks update-kubeconfig --name my-eks-cluster-name Updated context arn:aws:eks:us-east-2:0987654321:cluster/my-eks-cluster-name< in /Users/MY_USER/.kube/config
aws eks update-kubeconfig --name eks-cluster-name --region aws-region --role-arn
aws eks --region $(terraform output -raw region) update-kubeconfig --name $(terraform output -raw cluster_name)
aws eks --region $(terraform output -raw region) update-kubeconfig --name $(terraform output -raw cluster_name) Added new context arn:aws:eks:us-east-2:012345678912:cluster/education-eks-Ry318DCv to /Users/your_user/.kube/config
Contents
Errors[edit]
error: You must be logged in to the server (Unauthorized)
aws eks --region $(terraform output -raw region) update-kubeconfig --name $(terraform output -raw cluster_name) 'NoneType' object is not iterable Solution: rm ~/.kube/config and execute it again
the server has asked for the client to provide credentials
aws eks --region $(terraform output -raw region) update-kubeconfig --name $(terraform output -raw cluster_name)
Unable to parse config file: ~/.aws/config
Unable to locate credentials. You can configure credentials by running "aws configure".
aws eks list-clusters --output text | awk '{print $2}' | xargs -n1 aws eks update-kubeconfig --name
Added new context arn:aws:eks:eu-central-1:1234567890:cluster/you-cluster to /dev/null
Solution: echo $KUBECONFIG
Synopsys[edit]
update-kubeconfig --name <value> [--kubeconfig <value>] [--role-arn <value>] [--dry-run] [--verbose] [--alias <value>]
Activities[edit]
- Understand implication of using
--role-arnin youraws eks update-kubeconfig - How do I resolve an unauthorized server error when I connect to the Amazon EKS API server?
- Creating or updating a kubeconfig file for an Amazon EKS cluster
Related[edit]
~/.kube/configeksctl get cluster --all-regionsaws eks list-clusterskubectl get nodeskubectl cluster-infoaws eks list-clusters --output text | awk '{print $2}' | xargs -n1 aws eks update-kubeconfig --namegcloud container clusters get-credentials- Connect to K8s cluster
kubectl config rename-contextaws eks get-token- Amazon EKS authorization
See also[edit]
aws eks update-kubeconfig- AWS IAM Authenticator for Kubernetes:
aws-auth, kubectl edit -n kube-system configmap/aws-auth, eksctl create iamidentitymapping,mapUsers:, mapRoles:, mapAccounts:, EKS API - AWS EKS:
AWS::EKS,aws eks [ create-cluster | list-clusters|describe-cluster|update-kubeconfig | list-updates | list-addons | update-cluster-version | update-nodegroup-version | get-token | create-addon | list-access-entries | list-associated-access-policies ], create-access-entry
Advertising: