eksctl command to create eks cluster under a certain VPC

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

Upvotes: 0

Views: 365

Answers (1)

gohm'c
gohm'c

Reputation: 15480

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.

Upvotes: 1

Related Questions