jolly-plumber-1488
07/11/2022, 11:07 AMMessage_: "Security group(s) [sg-0cb56162e90f5f571] are not in the same VPC as the subnets. Please specify a security group that is associated with the VPC: vpc-0b6bc0745054144c7."
This the python code to create cluster:
cluster = eks.Cluster(
cluster_name,
version="1.22",
skip_default_node_group=True,
vpc_id=vpc.id,
public_subnet_ids=vpc.public_subnet_ids,
node_associate_public_ip_address=False,
private_subnet_ids=vpc.private_subnet_ids,
cluster_security_group=cluster_sg,
service_role=cluster_role,
instance_roles=[node_role],
create_oidc_provider=True,
cluster_tags=common_tags
)
I know EKS will create a separate security group for cluster service, but seems it’s using my default VPC instead of the vpc.id
that I passed.mammoth-electrician-64525
07/11/2022, 11:20 AMjolly-plumber-1488
07/11/2022, 11:25 AMid
and also vpc_id
in the output, the description of id
is:
The provider-assigned unique ID for this managed resource.What is that?
mammoth-electrician-64525
07/11/2022, 11:34 AMjolly-plumber-1488
07/11/2022, 11:38 AMmammoth-electrician-64525
07/11/2022, 11:48 AMjolly-plumber-1488
07/11/2022, 12:11 PM