All my external IPs in k8s are pending, what am I ...
# general
d
All my external IPs in k8s are pending, what am I missing?
b
which cloud provider are you using?
d
@billowy-army-68599 aws, creating the cluster with
eks.Cluster
b
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
@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
did you create your VPC with
awsx
?
d
@billowy-army-68599 yeah,
export const vpc = new awsx.ec2.Vpc('safira-pulumi-vpc', {
b
@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
@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
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
@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,