Posts

Showing posts with the label EKS

Fix: How to access eks in Github actions?

 To access an Amazon Elastic Kubernetes Service (EKS) cluster within a GitHub Actions workflow, you can use the `eksctl` CLI, which is a command-line utility for working with EKS. Here are the steps to access your EKS cluster from GitHub Actions: 1. **Configure AWS Credentials**:    Before you can interact with your EKS cluster, you need to configure AWS credentials in your GitHub Actions workflow. You can do this using GitHub Secrets. Create two secrets:    - `AWS_ACCESS_KEY_ID`: Set this secret to your AWS access key ID.    - `AWS_SECRET_ACCESS_KEY`: Set this secret to your AWS secret access key.    These secrets will allow GitHub Actions to authenticate with your AWS account. 2. **GitHub Actions Workflow File**:    Create a workflow file (e.g., `.github/workflows/deploy-to-eks.yml`) in your repository. This file defines the GitHub Actions workflow. Here's an example of a basic workflow that interacts with an EKS cluster:    ```yaml    name: Deploy to EKS    on:      push: