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

Unable to Create GKE clusters in non-default VPC (Terraform) #1641

Closed
moesy opened this issue Jun 23, 2020 · 0 comments · Fixed by #1695 or #1697
Closed

Unable to Create GKE clusters in non-default VPC (Terraform) #1641

moesy opened this issue Jun 23, 2020 · 0 comments · Fixed by #1695 or #1697
Assignees
Labels
area/operations Installation, updating, metrics etc kind/bug These are bugs.
Milestone

Comments

@moesy
Copy link
Contributor

moesy commented Jun 23, 2020

What happened:

I attempted to deploy Agones on a non-default VPC with the terraform scripts by changing the "network" variable to the name of my VPC network.

Creation failed with the following error:
Error: googleapi: Error 400: Network "MY-VPC-NAME" requires specifying a subnetwork., badRequest

What you expected to happen:
I expected a GKE cluster to be created in my defined network automatically.

As a workaround I expect the ability to define my subnetwork as well.

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:
The root cause is there is no subnetwork flag in the "google_container_cluster" resource.

While that is not an issue with a default network a subnetwork must be specified when using a non-default network.

Additional context: https://www.terraform.io/docs/providers/google/r/container_cluster.html

Environment:

  • Agones version: 1.6.0
  • Kubernetes version (use kubectl version):
    1.15
  • Cloud provider or hardware configuration:
    Google Cloud
  • Install method (yaml/helm):
    Terraform
  • Troubleshooting guide log(s):
  • Others:
@moesy moesy added the kind/bug These are bugs. label Jun 23, 2020
@markmandel markmandel added the area/operations Installation, updating, metrics etc label Jun 23, 2020
moesy pushed a commit to moesy/agones that referenced this issue Jun 25, 2020
When creating a GKE cluster in terraform with a non-default (custom) VPC
the subnetwork must be specified otherwise the operation will fail with an expected error.

Expected error when subnetwork isn't set:
- "Error: googleapi: Error 400: Network "MY-VPC-NAME" requires specifying a subnetwork., badRequest"

User should follow the instructions in README.md and specify the required fields based on whether
the cluster will run in a default VPC or custom VPC.

Tests performed:
- Able to create cluster in default VPC in a backwards compatible way - passed
- Able to create cluster in a user defined non-default network and subnetwork - passed

Reference
- googleforgames#1641
- https://www.terraform.io/docs/providers/google/r/container_cluster.html
@markmandel markmandel added this to the 1.8.0 milestone Aug 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/operations Installation, updating, metrics etc kind/bug These are bugs.
Projects
None yet
2 participants