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