Use this action to connect to an AWS EKS cluster from a GitHub Actions workflow.
This action will create or update the .kube/config
file, configuring Kubernetes clients (including the kubectl
CLI) to connect to your EKS cluster. It uses the update-kubeconfig
command provided by the AWS CLI.
See action.yml.
- uses: gumlet/aws-eks-action@v1.0
with:
# Name of the EKS cluster you want to access (required)
cluster: ''
# Name of the Kubernetes config context to create (default: EKS cluster name)
context: ''
# ARN of an IAM role to assign to cluster authentication
role: ''
# If 'true', the action will run use-context for the cluster's new context
activate: 'false'
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::123456789100:role/my-github-actions-role
aws-region: us-east-2
- name: Configure Kubernetes client
uses: gumlet/aws-eks-action@v1.0
with:
cluster: my-cluster-name
- name: Deploy service
run: |
kubectl apply -f ./deployment.yml
kubectl rollout status -f ./deployment.yml --timeout=15m
context
– The name of the Kubernetes context createdcluster_name
– The EKS cluster name for which access was configuredcluster_arn
– The ARN of the EKS clustercluster_status
– The observedstatus
of the EKS clustercluster_endpoint
– Thehttps://
origin of the cluster's API servercluster_tags
– The AWS tags applied to the EKS cluster, as a JSON objectkubernetes_version
– The Kubernetes version of the cluster, e.g.,1.24