# Class Cluster (2.65.0)

2.65.0 (latest) 2.62.0 2.61.0 2.60.0 2.59.0 2.58.0 2.57.0 2.56.1 2.55.1 2.54.0 2.53.0 2.52.0 2.50.0 2.49.0 2.48.0 2.47.1 2.46.0 2.45.0 2.44.0 2.43.0 2.42.0 2.41.0 2.40.0 2.39.0 2.38.0 2.37.0 2.36.0 2.35.0 2.34.0 2.33.0 2.32.0 2.31.0 2.30.0 2.29.0 2.28.0 2.27.0 2.26.0 2.25.0 2.24.0 2.23.0 2.22.0 2.21.0 2.20.0 2.19.0 2.18.0 2.17.4 2.16.0 2.15.0 2.14.0 2.13.0 2.12.2 2.11.2 2.10.8 2.9.0 2.8.1 2.7.1 2.6.1 2.5.0 2.4.1 2.3.1 2.2.0 2.1.0 2.0.1 1.0.3 0.5.0 0.4.0 0.3.0

    Cluster(mapping=None, *, ignore_unknown_fields=False, **kwargs)

A Google Kubernetes Engine cluster.

.. _oneof: <https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields>

| ## Attributes ||
|---|---|
| **Name** | **Description** |
| `name` | `str` The name of this cluster. The name must be unique within this project and location (e.g. zone or region), and can be up to 40 characters with the following restrictions: - Lowercase letters, numbers, and hyphens only. - Must start with a letter. - Must end with a number or a letter. |
| `description` | `str` An optional description of this cluster. |
| `initial_node_count` | `int` The number of nodes to create in this cluster. You must ensure that your Compute Engine \`resource quota |
| `node_config` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.NodeConfig` Parameters used in creating the cluster's nodes. For requests, this field should only be used in lieu of a "node_pool" object, since this configuration (along with the "initial_node_count") will be used to create a "NodePool" object with an auto-generated name. Do not use this and a node_pool at the same time. For responses, this field will be populated with the node configuration of the first node pool. (For configuration of each node pool, see `node_pool.config`) If unspecified, the defaults are used. This field is deprecated, use node_pool.config instead. |
| `master_auth` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.MasterAuth` The authentication information for accessing the master endpoint. If unspecified, the defaults are used: For clusters before v1.12, if master_auth is unspecified, `username` will be set to "admin", a random password will be generated, and a client certificate will be issued. |
| `logging_service` | `str` The logging service the cluster should use to write logs. Currently available options: - `logging.googleapis.com/kubernetes` - The Cloud Logging service with a Kubernetes-native resource model - `logging.googleapis.com` - The legacy Cloud Logging service (no longer available as of GKE 1.15). - `none` - no logs will be exported from the cluster. If left as an empty string,\\ `logging.googleapis.com/kubernetes` will be used for GKE 1.14+ or `logging.googleapis.com` for earlier versions. |
| `monitoring_service` | `str` The monitoring service the cluster should use to write metrics. Currently available options: - `monitoring.googleapis.com/kubernetes` - The Cloud Monitoring service with a Kubernetes-native resource model - `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no longer available as of GKE 1.15). - `none` - No metrics will be exported from the cluster. If left as an empty string,\\ `monitoring.googleapis.com/kubernetes` will be used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions. |
| `network` | `str` The name of the Google Compute Engine `network `__ to which the cluster is connected. If left unspecified, the `default` network will be used. On output this shows the network ID instead of the name. |
| `cluster_ipv4_cidr` | `str` The IP address range of the container pods in this cluster, in `CIDR `__ notation (e.g. `10.96.0.0/14`). Leave blank to have one automatically chosen or specify a `/14` block in `10.0.0.0/8`. |
| `addons_config` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.AddonsConfig` Configurations for the various addons available to run in the cluster. |
| `subnetwork` | `str` The name of the Google Compute Engine `subnetwork `__ to which the cluster is connected. On output this shows the subnetwork ID instead of the name. |
| `node_pools` | `MutableSequence[https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.NodePool]` The node pools associated with this cluster. This field should not be set if "node_config" or "initial_node_count" are specified. |
| `locations` | `MutableSequence[str]` The list of Google Compute Engine `zones `__ in which the cluster's nodes should be located. This field provides a default value if `NodePool.Locations `__ are not specified during node pool creation. Warning: changing cluster locations will update the `NodePool.Locations `__ of all node pools and will result in nodes being added and/or removed. |
| `enable_kubernetes_alpha` | `bool` Kubernetes alpha features are enabled on this cluster. This includes alpha API groups (e.g. v1beta1) and features that may not be production ready in the kubernetes version of the master and nodes. The cluster has no SLA for uptime and master/node upgrades are disabled. Alpha enabled clusters are automatically deleted thirty days after creation. |
| `alpha_cluster_feature_gates` | `MutableSequence[str]` The list of user specified Kubernetes feature gates. Each string represents the activation status of a feature gate (e.g. "featureX=true" or "featureX=false") |
| `enable_k8s_beta_apis` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.K8sBetaAPIConfig` Kubernetes open source beta apis enabled on the cluster. Only beta apis. |
| `resource_labels` | `MutableMapping[str, str]` The resource labels for the cluster to use to annotate any related Google Compute Engine resources. |
| `label_fingerprint` | `str` The fingerprint of the set of labels for this cluster. |
| `legacy_abac` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.LegacyAbac` Configuration for the legacy ABAC authorization mode. |
| `network_policy` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.NetworkPolicy` Configuration options for the NetworkPolicy feature. |
| `ip_allocation_policy` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.IPAllocationPolicy` Configuration for cluster IP allocation. |
| `master_authorized_networks_config` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.MasterAuthorizedNetworksConfig` The configuration options for master authorized networks feature. Deprecated: Use `ControlPlaneEndpointsConfig.IPEndpointsConfig.authorized_networks_config][google.container.v1beta1.ControlPlaneEndpointsConfig.IPEndpointsConfig.authorized_networks_config]` instead. |
| `maintenance_policy` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.MaintenancePolicy` Configure the maintenance policy for this cluster. |
| `binary_authorization` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.BinaryAuthorization` Configuration for Binary Authorization. |
| `pod_security_policy_config` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.PodSecurityPolicyConfig` Configuration for the PodSecurityPolicy feature. |
| `autoscaling` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.ClusterAutoscaling` Cluster-level autoscaling configuration. |
| `network_config` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.NetworkConfig` Configuration for cluster networking. |
| `private_cluster` | `bool` If this is a private cluster setup. Private clusters are clusters that, by default have no external IP addresses on the nodes and where nodes and the master communicate over private IP addresses. This field is deprecated, use private_cluster_config.enable_private_nodes instead. |
| `master_ipv4_cidr_block` | `str` The IP prefix in CIDR notation to use for the hosted master network. This prefix will be used for assigning private IP addresses to the master or set of masters, as well as the ILB VIP. This field is deprecated, use private_cluster_config.master_ipv4_cidr_block instead. |
| `default_max_pods_constraint` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.MaxPodsConstraint` The default constraint on the maximum number of pods that can be run simultaneously on a node in the node pool of this cluster. Only honored if cluster created with IP Alias support. |
| `resource_usage_export_config` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.ResourceUsageExportConfig` Configuration for exporting resource usages. Resource usage export is disabled when this config unspecified. |
| `authenticator_groups_config` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.AuthenticatorGroupsConfig` Configuration controlling RBAC group membership information. |
| `private_cluster_config` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.PrivateClusterConfig` Configuration for private cluster. |
| `vertical_pod_autoscaling` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.VerticalPodAutoscaling` Cluster-level Vertical Pod Autoscaling configuration. |
| `shielded_nodes` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.ShieldedNodes` Shielded Nodes configuration. |
| `release_channel` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.ReleaseChannel` Release channel configuration. If left unspecified on cluster creation and a version is specified, the cluster is enrolled in the most mature release channel where the version is available (first checking STABLE, then REGULAR, and finally RAPID). Otherwise, if no release channel configuration and no version is specified, the cluster is enrolled in the REGULAR channel with its default version. |
| `workload_identity_config` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.WorkloadIdentityConfig` Configuration for the use of Kubernetes Service Accounts in IAM policies. |
| `workload_certificates` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.WorkloadCertificates` Configuration for issuance of mTLS keys and certificates to Kubernetes pods. |
| `mesh_certificates` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.MeshCertificates` Configuration for issuance of mTLS keys and certificates to Kubernetes pods. |
| `workload_alts_config` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.WorkloadALTSConfig` Configuration for direct-path (via ALTS) with workload identity. This feature is not officially supported for external customers in Kubernetes Engine when using Workload Identity. |
| `cost_management_config` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.CostManagementConfig` Configuration for the fine-grained cost management feature. |
| `cluster_telemetry` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.ClusterTelemetry` Telemetry integration for the cluster. |
| `tpu_config` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.TpuConfig` Configuration for Cloud TPU support; This field is deprecated due to the deprecation of 2VM TPU. The end of life date for 2VM TPU is 2025-04-25. |
| `notification_config` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.NotificationConfig` Notification configuration of the cluster. |
| `confidential_nodes` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.ConfidentialNodes` Configuration of Confidential Nodes. All the nodes in the cluster will be Confidential VM once enabled. |
| `identity_service_config` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.IdentityServiceConfig` Configuration for Identity Service component. |
| `self_link` | `str` Output only. Server-defined URL for the resource. |
| `zone` | `str` Output only. The name of the Google Compute Engine `zone `__ in which the cluster resides. This field is deprecated, use location instead. |
| `endpoint` | `str` Output only. The IP address of this cluster's master endpoint. The endpoint can be accessed from the internet at `https://username:password@endpoint/`. See the `masterAuth` property of this resource for username and password information. |
| `initial_cluster_version` | `str` The initial Kubernetes version for this cluster. Valid versions are those found in validMasterVersions returned by getServerConfig. The version can be upgraded over time; such upgrades are reflected in currentMasterVersion and currentNodeVersion. Users may specify either explicit versions offered by Kubernetes Engine or version aliases, which have the following behavior: - "latest": picks the highest valid Kubernetes version - "1.X": picks the highest valid patch+gke.N patch in the 1.X version - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version - "1.X.Y-gke.N": picks an explicit Kubernetes version - "","-": picks the default Kubernetes version |
| `current_master_version` | `str` Output only. The current software version of the master endpoint. |
| `current_emulated_version` | `str` Output only. The current emulated version of the master endpoint. The version is in minor version format, e.g. 1.30. No value or empty string means the cluster has no emulated version. |
| `rollback_safe_upgrade` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.RollbackSafeUpgrade` The rollback safe upgrade information of the cluster. This field is used when user manually triggers a rollback safe upgrade. |
| `node_pool_upgrade_concurrency_config` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.NodePoolUpgradeConcurrencyConfig` The node pool upgrade concurrency config of the cluster. This field is used for auto upgrade. |
| `current_node_version` | `str` Output only. Deprecated, use `NodePool.version `__ instead. The current version of the node software components. If they are currently at multiple versions because they're in the process of being upgraded, this reflects the minimum version of all nodes. |
| `create_time` | `str` Output only. The time the cluster was created, in `RFC3339 `__ text format. |
| `status` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.Cluster.Status` Output only. The current status of this cluster. |
| `status_message` | `str` Output only. Deprecated. Use conditions instead. Additional information about the current status of this cluster, if available. |
| `node_ipv4_cidr_size` | `int` Output only. The size of the address space on each node for hosting containers. This is provisioned from within the `container_ipv4_cidr` range. This field will only be set when cluster is in route-based network mode. |
| `services_ipv4_cidr` | `str` Output only. The IP address range of the Kubernetes services in this cluster, in `CIDR `__ notation (e.g. `1.2.3.4/29`). Service addresses are typically put in the last `/16` from the container CIDR. |
| `instance_group_urls` | `MutableSequence[str]` Output only. Deprecated. Use node_pools.instance_group_urls. |
| `current_node_count` | `int` Output only. The number of nodes currently in the cluster. Deprecated. Call Kubernetes API directly to retrieve node information. |
| `expire_time` | `str` Output only. The time the cluster will be automatically deleted in `RFC3339 `__ text format. |
| `location` | `str` Output only. The name of the Google Compute Engine `zone `__ or `region `__ in which the cluster resides. |
| `enable_tpu` | `bool` Enable the ability to use Cloud TPUs in this cluster. This field is deprecated, use tpu_config.enabled instead. This field is deprecated due to the deprecation of 2VM TPU. The end of life date for 2VM TPU is 2025-04-25. |
| `tpu_ipv4_cidr_block` | `str` Output only. The IP address range of the Cloud TPUs in this cluster, in `CIDR `__ notation (e.g. `1.2.3.4/29`). This field is deprecated due to the deprecation of 2VM TPU. The end of life date for 2VM TPU is 2025-04-25. |
| `database_encryption` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.DatabaseEncryption` Configuration of etcd encryption. |
| `conditions` | `MutableSequence[https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.StatusCondition]` Which conditions caused the current cluster state. |
| `master` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.Master` Configuration for master components. |
| `autopilot` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.Autopilot` Autopilot configuration for the cluster. |
| `id` | `str` Output only. Unique id for the cluster. |
| `node_pool_defaults` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.NodePoolDefaults` Default NodePool settings for the entire cluster. These settings are overridden if specified on the specific NodePool object. This field is a member of `oneof`_ `_node_pool_defaults`. |
| `logging_config` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.LoggingConfig` Logging configuration for the cluster. |
| `monitoring_config` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.MonitoringConfig` Monitoring configuration for the cluster. |
| `node_pool_auto_config` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.NodePoolAutoConfig` Node pool configs that apply to all auto-provisioned node pools in autopilot clusters and node auto-provisioning enabled clusters. |
| `protect_config` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.ProtectConfig` Deprecated: Use SecurityPostureConfig instead. Enable/Disable Protect API features for the cluster. This field is a member of `oneof`_ `_protect_config`. |
| `pod_autoscaling` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.PodAutoscaling` The config for pod autoscaling. |
| `etag` | `str` This checksum is computed by the server based on the value of cluster fields, and may be sent on update requests to ensure the client has an up-to-date value before proceeding. |
| `fleet` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.Fleet` Fleet information for the cluster. |
| `security_posture_config` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.SecurityPostureConfig` Optional. Enable/Disable Security Posture API features for the cluster. |
| `control_plane_endpoints_config` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.ControlPlaneEndpointsConfig` Configuration for all cluster's control plane endpoints. |
| `enterprise_config` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.EnterpriseConfig` GKE Enterprise Configuration. Deprecated: GKE Enterprise features are now available without an Enterprise tier. |
| `secret_manager_config` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.SecretManagerConfig` Secret CSI driver configuration. |
| `compliance_posture_config` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.CompliancePostureConfig` Optional. Deprecated: Compliance Posture is no longer supported. For more details, see https://cloud.google.com/kubernetes-engine/docs/deprecations/posture-management-deprecation. Enable/Disable Compliance Posture features for the cluster. |
| `satisfies_pzs` | `bool` Output only. Reserved for future use. This field is a member of `oneof`_ `_satisfies_pzs`. |
| `satisfies_pzi` | `bool` Output only. Reserved for future use. This field is a member of `oneof`_ `_satisfies_pzi`. |
| `user_managed_keys_config` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.UserManagedKeysConfig` The Custom keys configuration for the cluster. This field is a member of `oneof`_ `_user_managed_keys_config`. |
| `rbac_binding_config` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.RBACBindingConfig` RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings that can be created. This field is a member of `oneof`_ `_rbac_binding_config`. |
| `gke_auto_upgrade_config` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.GkeAutoUpgradeConfig` Configuration for GKE auto upgrades. |
| `anonymous_authentication_config` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.AnonymousAuthenticationConfig` Configuration for limiting anonymous access to all endpoints except the health checks. |
| `schedule_upgrade_config` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.ScheduleUpgradeConfig` Optional. Configuration for scheduled upgrades. |
| `secret_sync_config` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.SecretSyncConfig` Configuration for sync Secret Manager secrets as k8s secrets. |
| `managed_opentelemetry_config` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.ManagedOpenTelemetryConfig` Configuration for Managed OpenTelemetry pipeline. |
| `control_plane_egress` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.ControlPlaneEgress` Configuration for control plane egress control. |
| `managed_machine_learning_diagnostics_config` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.ManagedMachineLearningDiagnosticsConfig` Configuration for managed machine learning diagnostics. |
| `node_creation_config` | `https://docs.cloud.google.com/python/docs/reference/container/latest/google.cloud.container_v1beta1.types.NodeCreationConfig` Optional. Configuration for Node Creation Mode. |

## Classes

### ResourceLabelsEntry

    ResourceLabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The abstract base class for a message.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `kwargs` | `dict` Keys and values corresponding to the fields of the message. |
| `mapping` | ``Union[dict, `.Message`]`` A dictionary or message to be used to determine the values for this message. |
| `ignore_unknown_fields` | `Optional(bool)` If True, do not raise errors for unknown fields. Only applied if `mapping` is a mapping type or there are keyword parameters. |

### Status

    Status(value)

The current status of the cluster.