-
Notifications
You must be signed in to change notification settings - Fork 0
EKS
Hüseyin Deniz KIVRAK edited this page Nov 17, 2024
·
2 revisions
Amazon Elastic Kubernetes Service (EKS) is a managed Kubernetes service provided by AWS. It simplifies the deployment, management, and scaling of Kubernetes clusters in the cloud.
In this setup, EKS clusters are created and managed using Terraform, with the aws
CLI tool used for authentication and integration with the AWS cloud platform.
-
Purpose: The
aws
CLI is the command-line interface for managing AWS resources. -
Use Case:
- Authenticate with AWS to provide Terraform with the necessary permissions for creating and managing EKS clusters.
- Retrieve EKS cluster credentials and configure the local
kubectl
context for interaction with the Kubernetes API.
To set up kubectl
to interact with an EKS cluster, use the following commands:
aws configure
aws eks list-clusters
aws eks --region $(terraform output -raw region) update-kubeconfig --name $(terraform output -raw cluster_name)
-
Explanation:
-
aws configure
: Sets up your AWS credentials and default region. This is required for Terraform andaws
CLI commands to work correctly. -
aws eks list-clusters
: Lists all available EKS clusters in your AWS account. -
aws eks update-kubeconfig
: Fetches credentials for the EKS cluster and updates the kubeconfig file with the correct context.
-
The Terraform configuration for creating and managing EKS clusters can be found in the following location within this repository:
/terraform/aws