Class Cluster (2.12.0)

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

A Google Kubernetes Engine cluster.


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
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.
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: - ```` - The Cloud Logging service with a Kubernetes-native resource model - ```` - 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,\ ```` will be used for GKE 1.14+ or ```` for earlier versions.
monitoring_service str
The monitoring service the cluster should use to write metrics. Currently available options: - "" - The Cloud Monitoring service with a Kubernetes-native resource model - ```` - 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,\ ```` will be used for GKE 1.14+ or ```` for earlier versions.
network str
The name of the Google Compute Engine `network
cluster_ipv4_cidr str
The IP address range of the container pods in this cluster, in `CIDR
Configurations for the various addons available to run in the cluster.
subnetwork str
The name of the Google Compute Engine `subnetwork
node_pools Sequence[]
The node pools associated with this cluster. This field should not be set if "node_config" or "initial_node_count" are specified.
locations Sequence[str]
The list of Google Compute Engine `zones
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.
resource_labels Mapping[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.
Configuration for the legacy ABAC authorization mode.
Configuration options for the NetworkPolicy feature.
Configuration for cluster IP allocation.
The configuration options for master authorized networks feature.
Configure the maintenance policy for this cluster.
Configuration for Binary Authorization.
Configuration for the PodSecurityPolicy feature.
Cluster-level autoscaling configuration.
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.
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.
Configuration for exporting resource usages. Resource usage export is disabled when this config unspecified.
Configuration controlling RBAC group membership information.
Configuration for private cluster.
Cluster-level Vertical Pod Autoscaling configuration.
Shielded Nodes configuration.
Release channel configuration.
Configuration for the use of Kubernetes Service Accounts in GCP IAM policies.
Configuration for issuance of mTLS keys and certificates to Kubernetes pods.
Configuration for issuance of mTLS keys and certificates to Kubernetes pods.
Configuration for direct-path (via ALTS) with workload identity.
Configuration for the fine-grained cost management feature.
Telemetry integration for the cluster.
Configuration for Cloud TPU support;
Notification configuration of the cluster.
Configuration of Confidential Nodes. All the nodes in the cluster will be Confidential VM once enabled.
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
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_node_version str
[Output only] Deprecated, use `NodePool.version
create_time str
[Output only] The time the cluster was created, in `RFC3339
[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
instance_group_urls Sequence[str]
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
location str
[Output only] The name of the Google Compute Engine `zone
enable_tpu bool
Enable the ability to use Cloud TPUs in this cluster. This field is deprecated, use tpu_config.enabled instead.
tpu_ipv4_cidr_block str
[Output only] The IP address range of the Cloud TPUs in this cluster, in `CIDR
Configuration of etcd encryption.
conditions Sequence[]
Which conditions caused the current cluster state.
Configuration for master components.
Autopilot configuration for the cluster.
id str
Output only. Unique id for the cluster.
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 configuration for the cluster.
Monitoring configuration for the cluster.
Node pool configs that apply to all auto-provisioned node pools in autopilot clusters and node auto-provisioning enabled clusters.
Enable/Disable Protect API features for the cluster. This field is a member of `oneof`_ ``_protect_config``.


builtins.object > proto.message.Message > Cluster



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

The abstract base class for a message.

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.



The current status of the cluster.