I was trying to use ansible to deploy the GKE cluster. But when I use initialClusterVersion with ansible gcp_container_cluster
, the error output like this.
fatal: localhost: FAILED! => {"changed": false, "msg": "Unsupported parameters for (gcp_container_cluster) module: initialClusterVersion Supported parameters include: addons_config, auth_kind, cluster_ipv4_cidr, default_max_pods_constraint, description, enable_tpu, env_type, initial_node_count, ip_allocation_policy, kubectl_context, kubectl_path, legacy_abac, location, locations, logging_service, master_auth, monitoring_service, name, network, network_policy, node_config, private_cluster_config, project, resource_labels, scopes, service_account_contents, service_account_email, service_account_file, state, subnetwork, tpu_ipv4_cidr_block"}
initialClusterVersion
is a return value, not a parameter.
You can use the initial_cluster_version
parameter if using Ansible versions 2.10 or 3.
Looking at your error message listing the supported parameters, I assume you are using an older version, and therefore will need to upgrade if you need to use the initial_cluster_version
parameter.
Thanks for the answer. I am using Ansible 2.9. Anyway, I managed to get the correct version with gcp_container_node_pool. As a workaround, I use the node pool GKE version.
- gcp_container_node_pool
version: 1.18.16-gke.302