Elastic Kubernetes Service
AWS EKS is a managed Kubernetes service that makes it easier to run Kubernetes on AWS without needing to install and operate your own Kubernetes control plane.
EKS Setup
This command initializes the creation of an EKS cluster using eksctl
, a simple CLI tool for creating and managing Kubernetes clusters on EKS:
The command does the following:
- Creates an EKS cluster named
cluster
in theus-east-2
region. - Specifies Kubernetes version
1.32
for the control plane. - Creates only the control plane (no worker nodes) using
--without-nodegroup
.
This setup allows for greater control, as node groups can be added and configured later.
Create AWSReservedSSO_AccountUser_ Role
Go to IAM Roles in the AWS Console and locate the full name of the role starting with AWSReservedSSO_AccountUser_
.
Store this name for future use.
Create a Dedicated Key in KMS
Create a new KMS Key for encryption/decryption:
- AWS Key Management Service (KMS) allows you to create and manage cryptographic keys for your applications and services.
- You will create a symmetric key, ideal for encryption/decryption of secrets, volumes, and other resources.
Step-by-step Configuration
- Configure Key
- Key Type: Symmetric
-
Key Usage: Encrypt and Decrypt
-
Add Labels
-
Display Name:
flexSimmetricKey
-
Define Key Administrative Permissions
-
Key Administrators: Select the IAM role named
AWSReservedSSO_AccountUser_
-
Define Key Usage Permissions
- Key Users: Add the role
AWSServiceRoleForAutoScaling
Once created, keep track of the Key ID — it will be needed by services using encryption.
Example format:
Create the Node Group
After the EKS control plane is up, add a node group (EC2 worker nodes) with the following:
eksctl
will create a managed node group based on the YAML configuration.
Sample cluster-nodeGroup.yaml
After creation, check node status:
Add Ingress Controller to Cluster
An Ingress Controller manages HTTP/HTTPS access to Kubernetes services.
- Add the official ingress-nginx Helm repo:
- Create a namespace for the ingress controller:
- Install the ingress-nginx controller:
- Confirm the deployment:
You can now expose services using
Ingress
resources managed by the NGINX controller.