Giter VIP home page Giter VIP logo

Comments (6)

jamesongithub avatar jamesongithub commented on July 26, 2024 1

@rquitales I added just the node role only and it did not work.

i had to change this reference from eks_cluster.core to eks_cluster

managed_node_group_infra = eks.ManagedNodeGroup("infra",
...
    cluster=eks_cluster.core,
    node_group_name="infra-nodes",
...
managed_node_group_infra = eks.ManagedNodeGroup("infra",
...
    cluster=eks_cluster,
    node_group_name="infra-nodes",
...

both changes, the node role in eks_cluster and this eks_cluster reference was required to deploy successfully

from pulumi-eks.

rquitales avatar rquitales commented on July 26, 2024 1

Thanks for the updates and further investigation - I'll look into why cluster.core isn't working. Glad you've managed to get unblocked though.

from pulumi-eks.

rquitales avatar rquitales commented on July 26, 2024

@jamesongithub Apologies that you're facing this. I was able to reproduce on my end. It seems like the error is coming from https://github.com/pulumi/pulumi-eks/blame/c95cf4402c8d3c1f71440c566a0b3d8caa2090b2/nodejs/eks/nodegroup.ts#L1662.

Note, I did not encounter this error when running this in a typescript pulumi program.

from pulumi-eks.

jamesongithub avatar jamesongithub commented on July 26, 2024

Hi @rquitales ,

Thanks for reproducing.

I can't tell from that stack trace.

A node role arn was passed to both node groups. Seems like that condition should pass?

thanks

from pulumi-eks.

rquitales avatar rquitales commented on July 26, 2024

@jamesongithub After looking at the repro code in more detail, it looks like you are missing declaring the node role within your cluster's instance roles.

Here is a python example which demonstrates this:

instance_roles=[role0, role1, role2])

When updating the code you provided, I can successfully create the managed node groups:

eks_cluster = eks.Cluster("eks-cluster",
    # Put the cluster in the new VPC created earlier
    vpc_id=eks_vpc.vpc_id,
    # Public subnets will be used for load balancers
    public_subnet_ids=eks_vpc.public_subnet_ids,
    # Private subnets will be used for cluster nodes
    private_subnet_ids=eks_vpc.private_subnet_ids,
    # Change configuration values to change any of the following settings

    # Do not give worker nodes a public IP address
    node_associate_public_ip_address=False,
    # Change these values for a private cluster (VPN access required)
    endpoint_private_access=False,
    endpoint_public_access=True,
    skip_default_node_group=True,
    instance_roles=[node_role],
)

# ...  rest of code

This is necessary because the nodegroup role needs to be set on the cluster to ensure that the aws-auth ConfigMap contains the required entries. Alternatively, you could use the newer Access Entry auth mode instead. Please see this documentation on enabling Access Entry for EKS clusters using this provider.

I'll keep this issue open however, since we can better handle the Cannot read properties of undefined (reading 'map') error we both observed so that a more meaningful error is presented.

from pulumi-eks.

jamesongithub avatar jamesongithub commented on July 26, 2024

Ok, thanks, Ill test it out.

It actually doesn't mention it as a prerequisite here: https://docs.aws.amazon.com/eks/latest/userguide/create-managed-node-group.html

Might be helpful to have a check on eks_cluster like there is on the managed_node_groups like you had referenced if it's a required attribute. (I'm unclear if it's needed only if you use managed node groups or not)

from pulumi-eks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.