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

dazzling-sundown-39670

05/29/2020, 11:31 AM
All my external IPs in k8s are pending, what am I missing?
b

billowy-army-68599

05/29/2020, 2:14 PM
which cloud provider are you using?
d

dazzling-sundown-39670

05/29/2020, 2:58 PM
@billowy-army-68599 aws, creating the cluster with
eks.Cluster
b

billowy-army-68599

05/29/2020, 3:02 PM
there's quite a few things this could be, check your IAM roles and make sure you have a public/private subnet targeted. The subnets also need to have specific tags on them https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html
d

dazzling-sundown-39670

05/29/2020, 3:17 PM
@billowy-army-68599 I see I'm missing those tags on the subnets. Do I need to create my own subnet and feed into the vpc or does
awsx.ec2.Vpc
contain any logic for this I can use?
b

billowy-army-68599

05/29/2020, 3:19 PM
did you create your VPC with
awsx
?
d

dazzling-sundown-39670

05/29/2020, 3:27 PM
@billowy-army-68599 yeah,
export const vpc = new awsx.ec2.Vpc('safira-pulumi-vpc', {
b

billowy-army-68599

05/29/2020, 4:37 PM
@dazzling-sundown-39670 you should be able to tag the subnets using by adding
Copy code
subnets: [
            // Any non-null value is valid.
            { type: "public", tags: {"<http://kubernetes.io/role/elb|kubernetes.io/role/elb>": "1", ...tags}},
            { type: "private", tags: {"<http://kubernetes.io/role/internal-elb|kubernetes.io/role/internal-elb>": "1", ...tags}},
        ],
thanks to @breezy-hamburger-69619 for pointing this out for me
d

dazzling-sundown-39670

05/29/2020, 4:47 PM
@billowy-army-68599 would have to have a fixed name for my cluster then? Seeing as the name isn't created until after the vpc
b

billowy-army-68599

05/29/2020, 4:49 PM
the name needs to exist on the subnet tags, it doesn't need to be fixed because the tags on the subnets are updatable. are you intending to have more than one cluster, or for them to be ephemeral?
d

dazzling-sundown-39670

05/30/2020, 8:45 AM
@billowy-army-68599 no, just one cluster. How would I go about to update the tags?
I did this:
Copy code
const stack = pulumi.getStack();
const clusterName = `k8s-pulumi-${stack}`;

const tags = {
  [`<http://kubernetes.io/cluster/${clusterName}`|kubernetes.io/cluster/${clusterName}`>]: 'shared',
};
But it wasn't enough. I don't have custom role for the cluster, do I need to create one?
Seems adding this to the cluster fixed it!
nodeAssociatePublicIpAddress: true,