Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws-go-eks is broken (after v4 update?) #1817

Open
zdrapela opened this issue Jan 28, 2025 · 1 comment
Open

aws-go-eks is broken (after v4 update?) #1817

zdrapela opened this issue Jan 28, 2025 · 1 comment
Labels
kind/bug Some behavior is incorrect or out of spec language/go

Comments

@zdrapela
Copy link

zdrapela commented Jan 28, 2025

What happened?

I tried to run the aws-go-eks example by running pulumi up, but I got an error. I expect it might happened due to the recent update of sdk to v4:

	"github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes"
	appsv1 "github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes/apps/v1"
	corev1 "github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes/core/v1"
	metav1 "github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes/meta/v1"

When I downgrade to v3 and go go get I get a step farther with pulumi up, but that eventually also fails.

Example with v4

$ pulumi up
Previewing update (dev)

View in Browser (Ctrl+O): https://app.pulumi.com/zdrapela/aws-go-eks/dev/previews/32e432a3-d4db-4174-9245-8487e3033aca

     Type                 Name            Plan     Info
     pulumi:pulumi:Stack  aws-go-eks-dev           1 error; 3 messages

Diagnostics:
  pulumi:pulumi:Stack (aws-go-eks-dev):
    # aws-go-eks
    ./main.go:173:35: namespace.Metadata.Elem undefined (type "github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes/meta/v1".ObjectMetaOutput has no field or method Elem)
    ./main.go:201:35: namespace.Metadata.Elem undefined (type "github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes/meta/v1".ObjectMetaOutput has no field or method Elem)

    error: error in compiling Go: unable to run `go build`: exit status 1

Example with v3 on us-east-1

I got a failure with us-east-1. After setting eu-north-1 as a default, I was able to successfully create the cluster.

$ pulumi up
Previewing update (dev)

View in Browser (Ctrl+O): https://app.pulumi.com/zdrapela/aws-go-eks/dev/previews/5cae7382-990a-4336-ae90-a7a0812dc941

     Type                              Name                Plan       
 +   pulumi:pulumi:Stack               aws-go-eks-dev      create     
 +   ├─ aws:iam:Role                   eks-iam-eksRole     create     
 +   ├─ aws:iam:Role                   nodegroup-iam-role  create     
 +   ├─ aws:iam:RolePolicyAttachment   ngpa-0              create     
 +   ├─ aws:iam:RolePolicyAttachment   ngpa-1              create     
 +   ├─ aws:iam:RolePolicyAttachment   rpa-1               create     
 +   ├─ aws:ec2:SecurityGroup          cluster-sg          create     
 +   ├─ aws:iam:RolePolicyAttachment   ngpa-2              create     
 +   ├─ aws:iam:RolePolicyAttachment   rpa-0               create     
 +   ├─ aws:eks:Cluster                eks-cluster         create     
 +   ├─ aws:eks:NodeGroup              node-group-2        create     
 +   ├─ pulumi:providers:kubernetes    k8sprovider         create     
 +   ├─ kubernetes:core/v1:Namespace   app-ns              create     
 +   ├─ kubernetes:apps/v1:Deployment  app-dep             create     
 +   └─ kubernetes:core/v1:Service     app-service         create     

Outputs:
    kubeconfig: output<string>
    url       : output<string>

Resources:
    + 15 to create

Do you want to perform this update? yes
Updating (dev)

View in Browser (Ctrl+O): https://app.pulumi.com/zdrapela/aws-go-eks/dev/updates/24

     Type                             Name                Status                  Info
 +   pulumi:pulumi:Stack              aws-go-eks-dev      **creating failed**     1 error
 +   ├─ aws:iam:Role                  nodegroup-iam-role  created (1s)            
 +   ├─ aws:iam:Role                  eks-iam-eksRole     created (2s)            
 +   ├─ aws:ec2:SecurityGroup         cluster-sg          created (5s)            
 +   ├─ aws:iam:RolePolicyAttachment  ngpa-1              created (0.99s)         
 +   ├─ aws:iam:RolePolicyAttachment  ngpa-2              created (1s)            
 +   ├─ aws:iam:RolePolicyAttachment  ngpa-0              created (1s)            
 +   ├─ aws:iam:RolePolicyAttachment  rpa-0               created (1s)            
 +   ├─ aws:iam:RolePolicyAttachment  rpa-1               created (1s)            
 +   └─ aws:eks:Cluster               eks-cluster         **creating failed**     2 errors

Diagnostics:
  aws:eks:Cluster (eks-cluster):
    error:   sdk-v2/provider2.go:515: sdk.helper_schema: creating EKS Cluster (eks-cluster-82ad2bb): operation error EKS: CreateCluster, https response error StatusCode: 400, RequestID: 8a1fd60e-64a8-40ca-a829-6f3a5e65171f, UnsupportedAvailabilityZoneException: Cannot create cluster 'eks-cluster-82ad2bb' because EKS does not support creating control plane instances in us-east-1e, the targeted availability zone. Retry cluster creation using control plane subnets that span at least two of these availability zones: us-east-1a, us-east-1b, us-east-1c, us-east-1d, us-east-1f. Note, post cluster creation, you can run worker nodes in separate subnets/availability zones from control plane subnets/availability zones passed during cluster creation: [email protected]
    error: 1 error occurred:
    	* creating EKS Cluster (eks-cluster-82ad2bb): operation error EKS: CreateCluster, https response error StatusCode: 400, RequestID: 8a1fd60e-64a8-40ca-a829-6f3a5e65171f, UnsupportedAvailabilityZoneException: Cannot create cluster 'eks-cluster-82ad2bb' because EKS does not support creating control plane instances in us-east-1e, the targeted availability zone. Retry cluster creation using control plane subnets that span at least two of these availability zones: us-east-1a, us-east-1b, us-east-1c, us-east-1d, us-east-1f. Note, post cluster creation, you can run worker nodes in separate subnets/availability zones from control plane subnets/availability zones passed during cluster creation

  pulumi:pulumi:Stack (aws-go-eks-dev):
    error: update failed

Resources:
    + 9 created

Duration: 16s

Output of pulumi about

CLI          
Version      3.147.0
Go Version   go1.23.5
Go Compiler  gc

Plugins
KIND      NAME        VERSION
resource  aws         6.67.0
language  go          3.147.0
resource  kubernetes  4.21.1
resource  kubernetes  3.30.2

Host     
OS       darwin
Version  15.2
Arch     arm64

This project is written in go: executable='/usr/local/go/bin/go' version='go version go1.23.5 darwin/arm64'

Current Stack: zdrapela/aws-go-eks/dev

TYPE                  URN
pulumi:pulumi:Stack   urn:pulumi:dev::aws-go-eks::pulumi:pulumi:Stack::aws-go-eks-dev
pulumi:providers:aws  urn:pulumi:dev::aws-go-eks::pulumi:providers:aws::default_6_67_0


Found no pending operations associated with dev

Backend        
Name           pulumi.com
URL            https://app.pulumi.com/zdrapela
User           zdrapela
Organizations  zdrapela
Token type     personal

Dependencies:
NAME                                        VERSION
github.com/pulumi/pulumi-aws/sdk/v6         v6.67.0
github.com/pulumi/pulumi-kubernetes/sdk/v3  v3.30.2
github.com/pulumi/pulumi-kubernetes/sdk/v4  v4.21.1
github.com/pulumi/pulumi/sdk/v3             v3.147.0

Pulumi locates its logs in /var/folders/7v/nnjpghy11y1gl47f9jjckjnh0000gn/T/ by default

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@zdrapela zdrapela added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Jan 28, 2025
@zdrapela zdrapela changed the title aws-go-eks is broken aws-go-eks is broken (after v4 update?) Jan 28, 2025
@mjeffryes
Copy link
Member

Thanks for letting us know about this problem @zdrapela. We're looking to do a significant update to our examples in the near future and this will help us to prioritize.

@mjeffryes mjeffryes added language/go and removed needs-triage Needs attention from the triage team labels Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec language/go
Projects
None yet
Development

No branches or pull requests

2 participants