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 16: | Line 16: | ||
* <code>[[aws eks]] --region $([[terraform output]] -raw region) update-kubeconfig --name $([[terraform output -raw cluster_name]])</code> | * <code>[[aws eks]] --region $([[terraform output]] -raw region) update-kubeconfig --name $([[terraform output -raw cluster_name]])</code> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
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) | ||
'[[NoneType]]' object is not iterable | '[[NoneType]]' object is not iterable | ||
Solution: rm [[~/.kube/config]] and execute it again | 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) | ||
− | + | Added new context arn:aws:eks:us-east-2:012345678912:cluster/education-eks-Ry318DCv to [[/Users/]]your_user/[[.kube/config]] | |
− | [[ | ||
== Synopsys == | == Synopsys == | ||
Line 48: | Line 36: | ||
== Activities == | == Activities == | ||
− | * Understand | + | * Understand the difference between using: |
− | |||
− | |||
== Related == | == Related == | ||
− | * <code>[[ | + | * <code>[[.kube/config]]</code> |
* <code>[[eksctl get cluster --all-regions]]</code> | * <code>[[eksctl get cluster --all-regions]]</code> | ||
* <code>[[aws eks list-clusters]]</code> | * <code>[[aws eks list-clusters]]</code> | ||
Line 59: | Line 45: | ||
* <code>[[kubectl cluster-info]]</code> | * <code>[[kubectl cluster-info]]</code> | ||
* <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> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
== See also == | == See also == | ||
− | * {{ | + | * {{kubectl}} |
* {{aws eks}} | * {{aws eks}} | ||
* {{K8s installation}} | * {{K8s installation}} | ||
[[Category:AWS]] | [[Category:AWS]] |
Advertising: