https://pulumi.com logo
#general
Title
# general
f

future-window-78560

01/04/2022, 8:57 PM
Hello! I am using the Pulumi_eks package to create fargate cluster on eks. I have created custom Vpc and subnets for the fargate cluster. The cluster is created, everything is fine but there are no nodes and pods. Any recommended solution for it?
b

billowy-army-68599

01/04/2022, 9:23 PM
@future-window-78560 can you share your code?
f

future-window-78560

01/04/2022, 9:49 PM
#===================================VPC and Subnets============================= import pulumi_aws as aws import pulumi_eks as eks #create vpc customvpc = aws.ec2.Vpc("vpc", cidr_block="10.0.0.0/16", #cidr_block='[0.0.0.0/0]' ) vpcId = customvpc.id export("VPC ID",vpcId) #VPC CIDR block cidr=customvpc.cidr_block export("CIDR BLOCK (Vpc)", cidr) #Private vpc subnet vpcPrivateSubnet= aws.ec2.Subnet("privatesubnet", vpc_id=vpcId, cidr_block=cidr, #cidr_block="10.0.0.0/24", availability_zone="us-east-2a", ) vpcPrivateSubnetIds=vpcPrivateSubnet.id export("Private Subnet ID",vpcPrivateSubnetIds) #SECOND CIDR BLOCK for subnet! secondary_cidr = aws.ec2.VpcIpv4CidrBlockAssociation("secondaryCidr", vpc_id=vpcId, cidr_block="172.2.0.0/16", ) #Public subnet in_secondary_cidr = aws.ec2.Subnet("inSecondaryCidr", vpc_id=secondary_cidr.vpc_id, map_public_ip_on_launch=True, cidr_block="172.2.0.0/24", availability_zone="us-east-2b", ) #Private subnet in_secondary_cidr2 = aws.ec2.Subnet("inSecondaryCidr2", vpc_id=secondary_cidr.vpc_id, #map_public_ip_on_launch=True, cidr_block="172.2.1.0/24", availability_zone="us-east-2b", ) secondarysubnetid=in_secondary_cidr.id secondarysubnetid2=in_secondary_cidr2.id export("Secondary public Subnet ID",secondarysubnetid) export("Secondary private Subnet ID",secondarysubnetid2)
#=======================================FARGATE CLUSTER========================================== cluster = eks.Cluster("anylyzer-hj", vpc_id=vpcId, private_subnet_ids=[vpcPrivateSubnetIds,secondarysubnetid2], #public_access_cidrs=['0.0.0.0/0'], fargate=True, instance_type="e2.medium", #desired_capacity=10, #min_size=5, #max_size=10, ) pulumi.export('kubeconfig', cluster.kubeconfig)
@billowy-army-68599 Here is the code
b

billowy-army-68599

01/04/2022, 9:54 PM
can you please wrap that in code blocks? it's hard to read
upload to gist.github.com if that helps
f

future-window-78560

01/04/2022, 9:57 PM
b

billowy-army-68599

01/04/2022, 9:57 PM
much better, thank you
f

future-window-78560

01/04/2022, 9:58 PM
Thankyou sir
b

billowy-army-68599

01/04/2022, 9:59 PM
Okay, you're missing quite a few things here. • you haven't set a fargate profile • you'll need to target your pods at that fargate profile, including the cluster specific pods like coredns You'll need to read this: https://docs.aws.amazon.com/eks/latest/userguide/fargate.html and this https://docs.aws.amazon.com/eks/latest/userguide/managing-coredns.html
you won't see any nodes until your pods have been scheduled
👍 1
f

future-window-78560

01/04/2022, 10:03 PM
Okay Okay I am looking into it. Just want to add one thing, that the fargate profile is been created.
3 Views