Skip to content

Instantly share code, notes, and snippets.

@mhmdio
Last active February 9, 2022 15:32
Show Gist options
  • Save mhmdio/0383e503e3e7be954b86554aeafea0e9 to your computer and use it in GitHub Desktop.
Save mhmdio/0383e503e3e7be954b86554aeafea0e9 to your computer and use it in GitHub Desktop.
EKS
# ~/.aws/config
[profile PROFILE_NAME]
sso_start_url=https://SSO_PORTAL_NAME.awsapps.com/start
sso_region=AWS_REGION
sso_account_id=AWS_ACCOUNT
sso_role_name=AdministratorAccess
output = yaml
cli_pager=
#

brew install --cask lens
aws sso login --profile PROFILE_NAME
aws sts get-caller-identity
aws eks update-kubeconfig --region AWS_REGION --name EKS_NAME

# ~/.kube/config
- name: arn:aws:eks:AWS_REGION:AWS_ACCOUNT:cluster/EKS_NAME
  user:
    exec:
      apiVersion: client.authentication.k8s.io/v1alpha1
      args:
      - --region
      - AWS_REGION
      - eks
      - get-token
      - --cluster-name
      - EKS_NAME
      - --profile
      - PROFILE_NAME
      command: aws
#
code ~/.kube/config
code ~/.aws/config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment