larhauga / eks-iam-cache

kubectl cache for EKS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

kubectl cache for EKS

License:MIT License


Languages

Language:Go 100.0%