Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Why is there an aws command embedded in the EKS kube config file?

I’m curious about something in the kube config file generated by the aws eks update-kubeconfig command. At the bottom of the file, there is this construct:

- name: arn:aws:eks:us-west-2:redacted:cluster/u62d2e14b31f0270011485fd3
  user:
    exec:
      apiVersion: client.authentication.k8s.io/v1beta1
      args:
      - --region
      - us-west-2
      - eks
      - get-token
      - --cluster-name
      - u62d2e14b31f0270011485fd3
      command: aws

It is clearly an invocation of the aws eks get-token command. Why is this here? Does this command get automatically called?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Why is this here?

The command gets an IAM token using your IAM account and pass along to EKS via the HTTP header Authorization: Bearer <token> for authentication. See here for details.

Does this command get automatically called?

Yes, by kubectl.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading