Skip to content

sparebank1utvikling/eks-iam-cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS EKS kubectl credential cache

Install

go install github.com/chlunde/eks-iam-cache@main

Configure ~/.kube/config

sed -i 's/command: aws/command: eks-iam-cache/' ~/.kube/config

or edit $KUBECONFIG:

apiVersion: v1
kind: Config
users:
- name: arn:aws:eks:eu-north-1:...:cluster/foo
  user:
    exec:
      apiVersion: client.authentication.k8s.io/v1alpha1
      command: aws
      args:
      - --region
      - eu-north-1
      - eks
      - get-token
      - --cluster-name
      - ...
      env:
      - name: AWS_PROFILE
        value: ...

replace aws in command: with eks-iam-cache:

      command: eks-iam-cache