<aside>
Before going to Step 2 & 3 - Food for thought
This project will try to implement the EKS cluster to be fully private (no public cluster endpoints, only private) → the cluster API server can only be accessible inside the VPC
Bastion host (or managing instance) will be used to access the cluster from outside the VPC
Instead of placing the bastion host in a public subnet, we can use SSM Session Manager to SSH into that bastion host BUT in a private subnet, reducing public availability. There are two ways to connect the private bastion host to AWS services on the Internet: NAT Gateway and VPC Endpoints
*https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html*
</aside>
<aside>
While using VPC Endpoints is a faster and more secure way to communicate with AWS services, NAT Gateway is more cost-efficient and easier to implement when using multiple services.
The bastion host requires two things:
ssm
, ssmmessages
, ec2messages
)eksctl
commands: 2+ VPC endpoints (eks
,cloudformation
, …)→ Require more than 5 VPC endpoints, minimal cost = $36/month = a NAT gateway
→ Also, low-latency traffic is not needed for cluster management purpose & installing software outside AWS (kubectl
and eksctl
) becomes much easier
⇒ NAT Gateway will be used in this project for bastion hosts
</aside>
From the console, create a VPC (I prefer no subnet option for easy customization)
Create the subnets for the VPC:
Create an Internet Gateway, then attach it to the VPC
Create a NAT Gateway:
Create the route tables, associate them with the correct subnets
The VPC should look something like this after the initial setup: