Editing Aws eks update-kubeconfig
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
{{lowercase}} | {{lowercase}} | ||
− | <code>[[aws eks]] update-kubeconfig</code> configures <code>[[kubectl]]</code> so that you can | + | <code>[[aws eks]] update-kubeconfig</code> configures <code>[[kubectl]]</code> so that you can connect to an Amazon EKS cluster. |
* https://awscli.amazonaws.com/v2/documentation/api/latest/reference/eks/update-kubeconfig.html | * https://awscli.amazonaws.com/v2/documentation/api/latest/reference/eks/update-kubeconfig.html | ||
[[aws eks list-clusters]] --output text | awk '{print $2}' | xargs -n1 [[aws eks]] update-kubeconfig --name | [[aws eks list-clusters]] --output text | awk '{print $2}' | xargs -n1 [[aws eks]] update-kubeconfig --name | ||
− | |||
− | aws eks update-kubeconfig | + | 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]] | 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 | + | |
+ | <code>[[aws eks]] update-kubeconfig --name my-eks-cluster-name</code> | ||
Updated context arn:aws:eks:us-east-2:0987654321:cluster/my-eks-cluster-name< in /Users/MY_USER/[[.kube/config]] | Updated context arn:aws:eks:us-east-2:0987654321:cluster/my-eks-cluster-name< in /Users/MY_USER/[[.kube/config]] | ||
Line 18: | Line 18: | ||
− | + | 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 | ||
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) | ||
Line 25: | Line 27: | ||
== Errors == | == Errors == | ||
[[error: You must be logged in to the server (Unauthorized)]] | [[error: You must be logged in to the server (Unauthorized)]] | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Synopsys == | == Synopsys == | ||
Line 49: | Line 40: | ||
== Activities == | == Activities == | ||
* Understand implication of using <code>[[--role-arn]]</code> in your <code>[[aws eks]] update-kubeconfig</code> | * Understand implication of using <code>[[--role-arn]]</code> in your <code>[[aws eks]] update-kubeconfig</code> | ||
− | |||
− | |||
== Related == | == Related == | ||
Line 60: | Line 49: | ||
* <code>[[aws eks list-clusters]] --output text | awk '{print $2}' | xargs -n1 [[aws eks update-kubeconfig]] --name</code> | * <code>[[aws eks list-clusters]] --output text | awk '{print $2}' | xargs -n1 [[aws eks update-kubeconfig]] --name</code> | ||
* <code>[[gcloud container clusters get-credentials]]</code> | * <code>[[gcloud container clusters get-credentials]]</code> | ||
− | |||
− | |||
− | |||
− | |||
== See also == | == See also == | ||
− | * {{ | + | * {{kubectl}} |
* {{aws eks}} | * {{aws eks}} | ||
* {{K8s installation}} | * {{K8s installation}} | ||
[[Category:AWS]] | [[Category:AWS]] |
Advertising: