-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 enable private nodes when creating nodes with specified pod ip range #1493
Comments
Experiencing the same issue. Terraform Version
Terraform Configuration
Relevant terraform debug logs from a targeted apply:
|
Hi, in TF google provider v4.45.0 release there were introduced new node_pool I can prepare PR to fix this in this module when I have time. |
Hi splichy @splichy , as you can see in pasted template, we've already enabled enable_private_nodes but still the problem occurs... |
@Shelby-Jiao it must be enabled also on node pool level, but that's currently missing in module. |
TL;DR
We are trying to create private nodes with our specified pod ip range
So we set the variable enable_private_nodes to true.
After the change, the terraform plan is broken. It seems the provider kubernetes couldn't make a request with error
Error: error creating NodePool: googleapi: Error 400: EnablePrivateNodes must be enabled for private clusters with valid masterIpv4Cidr., badRequest
I find there's no variables for changing this in resource "google_container_node_pool" "pools"
Expected behavior
a new node should be created as described below:
module.gke.google_container_node_pool.pools["default-node-pool"] will be created with such network config
resource "google_container_node_pool" "pools"
network_config {
enable_private_nodes = (known after apply)
pod_ipv4_cidr_block = (known after apply)
pod_range = "blablabla"
}
Observed behavior
Error: error creating NodePool: googleapi: Error 400: EnablePrivateNodes must be enabled for private clusters with valid masterIpv4Cidr., badRequest with module.gke.google_container_node_pool.pools["default-node-pool"], on .terraform/modules/gke/modules/beta-private-cluster/cluster.tf line 416, in resource "google_container_node_pool" "pools": 416: resource "google_container_node_pool" "pools" {
Terraform Configuration
Terraform Version
Additional information
No response
The text was updated successfully, but these errors were encountered: