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

Make VPC-native clusters the default in google_container_cluster #5842

Closed

Comments

@rileykarson
Copy link
Collaborator

rileykarson commented Mar 5, 2020

This is a breaking change and possibly not worth doing if the user impact is too high.

Many new GKE features rely on clusters being "vpc-native", first-class citizens in GCP VPC networks. Many older clusters are "routes-based", where they communicate over routes instead of through networks. gcloud and the Cloud Console both default to VPC-native, while the REST API defaults to routes-based.

A config like the following is routes-based:

resource "google_container_cluster" "primary" {
  name     = "my-gke-cluster"
  location = "us-central1"
  initial_node_count = 1
}

vs a VPC-native one:

resource "google_container_cluster" "primary" {
  name     = "my-gke-cluster"
  location = "us-central1"
  initial_node_count = 1
  ip_allocation_policy {
    cluster_ipv4_cidr_block = "/16"
	services_ipv4_cidr_block = "/22"
  }
}

VPC-native clusters contain additional configuration on top of routes-based ones, and there's no current flag to indicate that a cluster should be routes based. It's difficult to represent VPC-native as the default, especially in a way that will make the upgrade path for our users safe. However, the benefit to our users by flipping the default will be large- clusters cannot move from VPC-native to routes-based or vice-versa, and many features rely on VPC-native clusters.

b/299442842

@rileykarson rileykarson added this to the 4.0.0 milestone Mar 5, 2020
@rileykarson
Copy link
Collaborator Author

Alternatively, safely making Terraform pick up whatever the API default is may be a better alternative.

modular-magician added a commit to modular-magician/terraform-provider-google that referenced this issue Mar 23, 2022
Signed-off-by: Modular Magician <magic-modules@google.com>
modular-magician added a commit that referenced this issue Mar 23, 2022
Signed-off-by: Modular Magician <magic-modules@google.com>
@sdmodi
Copy link

sdmodi commented Feb 7, 2023

This really needs to be fixed. Lots of GKE customers end up with routes based clusters and this is a problem because almost all new features are not supported for routes based clusters.

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.