Pulumi SDK requires master_ipv4_cidr_block for a private GKE (1.29+) cluster #2806
Labels
kind/bug
Some behavior is incorrect or out of spec
needs-triage
Needs attention from the triage team
Describe what happened
Creating a private GKE cluster (enable_private_nodes as true) should not necessitate master_ipv4_cidr_block.
Starting GKE 1.29, Google switched to Private Service Connect (PSC) over VPC peering for establishing the connectivity between the worker nodes and the Google managed control plane. The distinction of public vs. private clusters as it relates to the controlplane connectivity has been eliminated and it is always PSC based, regardless of nodes being assigned a public IP address or not. Refer to the below links:
https://cloud.google.com/blog/products/containers-kubernetes/understanding-gkes-new-control-plane-connectivity?e=48754805
https://cloud.google.com/kubernetes-engine/docs/concepts/private-service-connect#architecture
Pulumi (using Go SDK) seems to be mandating that one must provide an IPV4 block for provisioning the hosted controplane infrastructure.
Sample program
func StandardCluster(ctx *pulumi.Context, clusterConfig *StandardClusterConfig) error {
}
Log output
Updating (gke-nam-alto-core-std-dev):
Type Name Status Info
Diagnostics:
pulumi:pulumi:Stack (cloud-platforms-clusters-gke-nam-alto-core-std-dev):
error: update failed
gcp:container:Cluster (nam-central1-dev-std-01):
error: sdk-v2/provider2.go:385: sdk.helper_schema: master_ipv4_cidr_block must be set if enable_private_nodes is true: [email protected]
error: 1 error occurred:
* master_ipv4_cidr_block must be set if enable_private_nodes is true
Affected Resource(s)
No response
Output of
pulumi about
CLI
Version 3.142.0
Go Version go1.23.3
Go Compiler gc
Plugins
KIND NAME VERSION
resource gcp 7.38.0
language go unknown
Host
OS debian
Version 11.7
Arch x86_64
This project is written in go: executable='/usr/local/go/bin/go' version='go version go1.23.3 linux/amd64'
Current Stack: organization/cloud-platforms-clusters/gke-nam-alto-core-std-dev
TYPE URN
pulumi:pulumi:Stack urn:pulumi:gke-nam-alto-core-std-dev::cloud-platforms-clusters::pulumi:pulumi:Stack::cloud-platforms-clusters-gke-nam-alto-core-std-dev
pulumi:providers:gcp urn:pulumi:gke-nam-alto-core-std-dev::cloud-platforms-clusters::pulumi:providers:gcp::default_7_38_0
Found no pending operations associated with gke-nam-alto-core-std-dev
Backend
Name penguin
URL gs://foundations-pulumi-back-end-kubernetes-clusters
User ******
Organizations
Token type personal
Dependencies:
NAME VERSION
github.com/pulumi/pulumi-gcp/sdk/v7 v7.38.0
github.com/pulumi/pulumi/sdk/v3 v3.137.0
Pulumi locates its logs in /tmp 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).
The text was updated successfully, but these errors were encountered: