Amazon EKS Operations: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 13: Line 13:
<syntaxhighlight lang='bash'>
<syntaxhighlight lang='bash'>
aws eks --region us-east-1 describe-cluster --name example-cluster --query "cluster.status"
aws eks --region us-east-1 describe-cluster --name example-cluster --query "cluster.status"
"ACTIVE"
"ACTIVE"
</syntaxhighlight>
</syntaxhighlight>
Line 19: Line 20:
<syntaxhighlight lang='bash'>
<syntaxhighlight lang='bash'>
aws eks --region us-east-1 describe-cluster --name example-cluster --query "cluster.endpoint" --output text
aws eks --region us-east-1 describe-cluster --name example-cluster --query "cluster.endpoint" --output text
https://FDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.gr0.us-east-1.eks.amazonaws.com
https://FDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.gr0.us-east-1.eks.amazonaws.com
</syntaxhighlight>
</syntaxhighlight>
Line 25: Line 27:
<syntaxhighlight lang='bash'>
<syntaxhighlight lang='bash'>
aws eks --region us-east-1 describe-cluster --name example-cluster --query "cluster.certificateAuthority.data" --output text
aws eks --region us-east-1 describe-cluster --name example-cluster --query "cluster.certificateAuthority.data" --output text
LS0t...LQo=
LS0t...LQo=
</syntaxhighlight>
</syntaxhighlight>

Revision as of 21:55, 14 June 2020

External

Internal

Overview

Cluster Information

Cluster Status

aws eks --region us-east-1 describe-cluster --name example-cluster --query "cluster.status"

"ACTIVE"

Cluster Endpoint

aws eks --region us-east-1 describe-cluster --name example-cluster --query "cluster.endpoint" --output text

https://FDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.gr0.us-east-1.eks.amazonaws.com

Cluster Certificate Authority

aws eks --region us-east-1 describe-cluster --name example-cluster --query "cluster.certificateAuthority.data" --output text

LS0t...LQo=

Connect to an EKS Cluster with kubectl

Update .kube/config with the EKS cluster definition as follows:

aws eks --region us-east-1 update-kubeconfig --name example-eks-cluster

The result is to add a new context to ./kube/config:

Added new context arn:aws:eks:us-east-1:999999999999:cluster/example-eks-cluster to /Users/testuser/.kube/config

The default name of the context is the name of the IAM role, but it can be changed to make it more wieldy.