https://pulumi.com logo
#python
Title
# python
c

creamy-beach-53040

05/23/2023, 4:47 PM
Hello, I have a code that was working a week ago, but it doesn't anymore. I'm trying to create an EKS cluster, the worker nodes are created but they aren't attached to the cluster anymore. I'm using the following versions:
Copy code
'pulumi==3.68.0',
'pulumi-aws==5.41.0',
'pulumi-eks==1.0.2',
'pulumi-kubernetes==3.28.0',
'pulumi-awsx==1.0.2'
This is the code:
Copy code
cluster = eks.Cluster(
    f"cluster-{project_name}-{stack_name}",
    vpc_id=vpc.vpc_id,
    subnet_ids=kube_subnets,
    node_associate_public_ip_address=False,
    enabled_cluster_log_types=[
        "api",
        "audit",
        "authenticator",
    ],
    tags=tags,
    min_size=5,
    max_size=10,
    desired_capacity=5,
    instance_type=t2.large,
    instance_role=cluster_node_role,
    provider_credential_opts=eks.KubeconfigOptionsArgs(profile_name="pulumi")
)
I also tried the following configuration, in this case the cluster size and instance type change to the default 2, and t2.medium respectively. The extra_node_security_groups weren't assigned to the nodes.
Copy code
cluster = peks.Cluster(
    f"cluster-{project_name}-{stack_name}",
    vpc_id=vpc.vpc_id,
    subnet_ids=kube_subnets,
    node_associate_public_ip_address=False,
    enabled_cluster_log_types=[
        "api",
        "audit",
        "authenticator",
    ],
    tags=tags,
    node_group_options=peks.ClusterNodeGroupOptionsArgs(
        extra_node_security_groups=[db_security_group],
        min_size=5,
        max_size=10,
        desired_capacity=5,
        instance_type="t2.large"
    ),
    instance_role=cluster_node_role,
    provider_credential_opts=peks.KubeconfigOptionsArgs(profile_name="pulumi")
)
Thanks in advance for any hint provided.
h

hundreds-lunch-5706

05/23/2023, 9:54 PM
What is the error you're getting?
c

creamy-beach-53040

05/23/2023, 11:46 PM
No error at all, the cluster is created as well as the worker nodes, but they aren't attached to the cluster. If I run
kubectl get nodes
i get
No resources found
2 Views