Create EKS cluster

  EKS, k8s

1. Creating the Amazon EKS cluster role

  1. Open the IAM console at https://console.aws.amazon.com/iam/.
  2. Choose Roles, then Create role.
  3. Under Trusted entity type, select AWS service.
  4. From the Use cases for other AWS services dropdown list, choose EKS.
  5. Choose EKS – Cluster for your use case, and then choose Next.
  6. On the Add permissions tab, choose Next.
  7. For Role name, enter a unique name for your role, such as eksClusterRole.
  8. For Description, enter descriptive text such as Amazon EKS - Cluster role.
  9. Choose Create role.

2. VPC

Create Subnet

10.0.0.0 => binary 00000000.00000000.00000000.00000000/16

Total bit in IP is 32.

we have last 8 bit to set IP for VPC. If devive to 4 subnet => we use 2 first bit to devive, 6 last bit to set IP => we have: 00000000, 10000000, 11000000, 01000000 => 10.0.0.0/26, 10.0.0.128/26, 10.0.0.192/26, 10.0.0.64/26
We have 64 IP for each subnet

If use 2 subnet => 10.0.0.0/25 and 10.0.0.128/25

Set subnet public

VPC > subnet > subnet detail > edit subnet setting

Check enable auto-assign public IPv4 address

Routing table will auto create then we edit it

VPC > VPC detail > detail tab > Main route table

create internet gateway for VPC

Go to VPC > route table detail > routes tab > edit routes button: Add new route with destination 0.0.0.0/0 and target is Internet gateway we create above

Checking VPC map

3. Create Security group

10. Create EKS cluster

EKS > Cluster > Create cluster

Next with default then create