eksctl command to create eks cluster under a certain VPC

64 views Asked by At

In my AWS account, I have a VPC that I want to create an EKS cluster under. How do I modify this command to create the cluster under said VPC?

eksctl create cluster \
--name app-api \
--version 1.29 \
--region us-east-1 \
--nodegroup-name app-api-worker-group \
--node-type t2.micro \
--nodes 1
1

There are 1 answers

3
gohm'c On

You do not need to specify VPC ID at the command line, eksctl will automatically determine the VPC ID when you specify the subnets (--vpc-private-subnets, --vpc-public-subnets) to use. Note that in this case you are to ensure the VPC fully met the EKS network requirement. See here for complete details.