is there a way to set the availability zone of an ...
# kubernetes
b
is there a way to set the availability zone of an eks cluster? when trying to create a cluster in us-east-1 i get:
Copy code
Cannot create cluster 'asp-staging-eksCluster-9deaa44' because us-east-1e, the targeted availability zone, does not currently have sufficient capacity to support the cluster. Retry and choose from these availability zones: us-east-1a, us-east-1b, us-east-1c, us-east-1d, us-east-1f
g
@breezy-hamburger-69619 ?
b
No there is currently not a way of setting AZ’s for a cluster’s nodes. More info can be found at https://github.com/pulumi/pulumi-eks/issues/95#issuecomment-588347991 If you could provide any input there, we’d appreciate it.
b
just so i'm clear, you're saying that
eks.Cluster
is using cloudformation templates to spawn the nodes, and that's the reason for the failure?
b
Right.
eks.Cluster
’s default node group [1], and
createNodeGroup()
[2] both are pulumi constructs that create a self-managed node group using CloudFormation templates. This CF support was originally added as there was no first-class resource for NodeGroups until Manged Node Groups was released, and then added in to pulumi/eks via `createManagedNodeGroup()`[3] The error seems to be due to AWS’s lack of capacity for nodes in EKS clusters, but I’m not sure to what extent this is for e.g. is it bound by clusters, or nodes joining the cluster or something else. The suggested work around is to attempt to use managed node groups in hopes that this gets around any capacity issues that seem to be associated with attaching nodes to the cluster ourselves, versus letting AWS handle it. I’m not sure if this will entirely solve the problem, but it’s worth trying out. Please let us know how you fair 1 - https://github.com/pulumi/pulumi-eks/blob/master/nodejs/eks/cluster.ts#L1071-L1077 2 - https://github.com/pulumi/pulumi-eks/blob/master/nodejs/eks/nodegroup.ts#L267 3 - https://github.com/pulumi/pulumi-eks/blob/master/nodejs/eks/nodegroup.ts#L704
b
thanks for the thorough explanation! i'll give it a try when i have a few minutes.
using
createManagedNodeGroup
by itself wasn't enough to get past the availability zone failure. do i have to manually specify the subnets?