class ProjectsZonesClusters extends Resource (View source)

The "clusters" collection of methods.

Typical usage is:

 $containerService = new Google\Service\Container(...);
 $clusters = $containerService->projects_zones_clusters;

Methods

addons(string $projectId, string $zone, string $clusterId, SetAddonsConfigRequest $postBody, array $optParams = [])

Sets the addons for a specific cluster. (clusters.addons)

completeIpRotation(string $projectId, string $zone, string $clusterId, CompleteIPRotationRequest $postBody, array $optParams = [])

Completes master IP rotation. (clusters.completeIpRotation)

create(string $projectId, string $zone, CreateClusterRequest $postBody, array $optParams = [])

Creates a cluster, consisting of the specified number and type of Google Compute Engine instances. By default, the cluster is created in the project's default network. One firewall is added for the cluster. After cluster creation, the Kubelet creates routes for each node to allow the containers on that node to communicate with all other instances in the cluster. Finally, an entry is added to the project's global metadata indicating which CIDR range the cluster is using. (clusters.create)

delete(string $projectId, string $zone, string $clusterId, array $optParams = [])

Deletes the cluster, including the Kubernetes endpoint and all worker nodes.

get(string $projectId, string $zone, string $clusterId, array $optParams = [])

Gets the details of a specific cluster. (clusters.get)

legacyAbac(string $projectId, string $zone, string $clusterId, SetLegacyAbacRequest $postBody, array $optParams = [])

Enables or disables the ABAC authorization mechanism on a cluster.

listProjectsZonesClusters(string $projectId, string $zone, array $optParams = [])

Lists all clusters owned by a project in either the specified zone or all zones. (clusters.listProjectsZonesClusters)

locations(string $projectId, string $zone, string $clusterId, SetLocationsRequest $postBody, array $optParams = [])

Sets the locations for a specific cluster. Deprecated. Use projects.locations.clusters.update instead.

logging(string $projectId, string $zone, string $clusterId, SetLoggingServiceRequest $postBody, array $optParams = [])

Sets the logging service for a specific cluster. (clusters.logging)

master(string $projectId, string $zone, string $clusterId, UpdateMasterRequest $postBody, array $optParams = [])

Updates the master for a specific cluster. (clusters.master)

monitoring(string $projectId, string $zone, string $clusterId, SetMonitoringServiceRequest $postBody, array $optParams = [])

Sets the monitoring service for a specific cluster. (clusters.monitoring)

resourceLabels(string $projectId, string $zone, string $clusterId, SetLabelsRequest $postBody, array $optParams = [])

Sets labels on a cluster. (clusters.resourceLabels)

setMaintenancePolicy(string $projectId, string $zone, string $clusterId, SetMaintenancePolicyRequest $postBody, array $optParams = [])

Sets the maintenance policy for a cluster. (clusters.setMaintenancePolicy)

setMasterAuth(string $projectId, string $zone, string $clusterId, SetMasterAuthRequest $postBody, array $optParams = [])

Sets master auth materials. Currently supports changing the admin password or a specific cluster, either via password generation or explicitly setting the password. (clusters.setMasterAuth)

setNetworkPolicy(string $projectId, string $zone, string $clusterId, SetNetworkPolicyRequest $postBody, array $optParams = [])

Enables or disables Network Policy for a cluster. (clusters.setNetworkPolicy)

startIpRotation(string $projectId, string $zone, string $clusterId, StartIPRotationRequest $postBody, array $optParams = [])

Starts master IP rotation. (clusters.startIpRotation)

update(string $projectId, string $zone, string $clusterId, UpdateClusterRequest $postBody, array $optParams = [])

Updates the settings of a specific cluster. (clusters.update)

Details

Operation addons(string $projectId, string $zone, string $clusterId, SetAddonsConfigRequest $postBody, array $optParams = [])

Sets the addons for a specific cluster. (clusters.addons)

Parameters

string $projectId

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

string $zone

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

string $clusterId

Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.

SetAddonsConfigRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation completeIpRotation(string $projectId, string $zone, string $clusterId, CompleteIPRotationRequest $postBody, array $optParams = [])

Completes master IP rotation. (clusters.completeIpRotation)

Parameters

string $projectId

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

string $zone

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

string $clusterId

Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.

CompleteIPRotationRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation create(string $projectId, string $zone, CreateClusterRequest $postBody, array $optParams = [])

Creates a cluster, consisting of the specified number and type of Google Compute Engine instances. By default, the cluster is created in the project's default network. One firewall is added for the cluster. After cluster creation, the Kubelet creates routes for each node to allow the containers on that node to communicate with all other instances in the cluster. Finally, an entry is added to the project's global metadata indicating which CIDR range the cluster is using. (clusters.create)

Parameters

string $projectId

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the parent field.

string $zone

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the parent field.

CreateClusterRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation delete(string $projectId, string $zone, string $clusterId, array $optParams = [])

Deletes the cluster, including the Kubernetes endpoint and all worker nodes.

Firewalls and routes that were configured during cluster creation are also deleted. Other Google Compute Engine resources that might be in use by the cluster, such as load balancer resources, are not deleted if they weren't present when the cluster was initially created. (clusters.delete)

Parameters

string $projectId

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

string $zone

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

string $clusterId

Deprecated. The name of the cluster to delete. This field has been deprecated and replaced by the name field.

array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Cluster get(string $projectId, string $zone, string $clusterId, array $optParams = [])

Gets the details of a specific cluster. (clusters.get)

Parameters

string $projectId

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

string $zone

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

string $clusterId

Deprecated. The name of the cluster to retrieve. This field has been deprecated and replaced by the name field.

array $optParams

Optional parameters.

Return Value

Cluster

Exceptions

Exception

Operation legacyAbac(string $projectId, string $zone, string $clusterId, SetLegacyAbacRequest $postBody, array $optParams = [])

Enables or disables the ABAC authorization mechanism on a cluster.

(clusters.legacyAbac)

Parameters

string $projectId

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

string $zone

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

string $clusterId

Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field.

SetLegacyAbacRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

ListClustersResponse listProjectsZonesClusters(string $projectId, string $zone, array $optParams = [])

Lists all clusters owned by a project in either the specified zone or all zones. (clusters.listProjectsZonesClusters)

Parameters

string $projectId

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the parent field.

string $zone

Deprecated. The name of the Google Compute Engine zone in which the cluster resides, or "-" for all zones. This field has been deprecated and replaced by the parent field.

array $optParams

Optional parameters.

Return Value

ListClustersResponse

Exceptions

Exception

Operation locations(string $projectId, string $zone, string $clusterId, SetLocationsRequest $postBody, array $optParams = [])

Sets the locations for a specific cluster. Deprecated. Use projects.locations.clusters.update instead.

(clusters.locations)

Parameters

string $projectId

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

string $zone

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

string $clusterId

Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.

SetLocationsRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation logging(string $projectId, string $zone, string $clusterId, SetLoggingServiceRequest $postBody, array $optParams = [])

Sets the logging service for a specific cluster. (clusters.logging)

Parameters

string $projectId

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

string $zone

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

string $clusterId

Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.

SetLoggingServiceRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation master(string $projectId, string $zone, string $clusterId, UpdateMasterRequest $postBody, array $optParams = [])

Updates the master for a specific cluster. (clusters.master)

Parameters

string $projectId

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

string $zone

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

string $clusterId

Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.

UpdateMasterRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation monitoring(string $projectId, string $zone, string $clusterId, SetMonitoringServiceRequest $postBody, array $optParams = [])

Sets the monitoring service for a specific cluster. (clusters.monitoring)

Parameters

string $projectId

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

string $zone

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

string $clusterId

Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.

SetMonitoringServiceRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation resourceLabels(string $projectId, string $zone, string $clusterId, SetLabelsRequest $postBody, array $optParams = [])

Sets labels on a cluster. (clusters.resourceLabels)

Parameters

string $projectId

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

string $zone

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

string $clusterId

Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.

SetLabelsRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation setMaintenancePolicy(string $projectId, string $zone, string $clusterId, SetMaintenancePolicyRequest $postBody, array $optParams = [])

Sets the maintenance policy for a cluster. (clusters.setMaintenancePolicy)

Parameters

string $projectId

Required. The Google Developers Console project ID or project number.

string $zone

Required. The name of the Google Compute Engine zone in which the cluster resides.

string $clusterId

Required. The name of the cluster to update.

SetMaintenancePolicyRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation setMasterAuth(string $projectId, string $zone, string $clusterId, SetMasterAuthRequest $postBody, array $optParams = [])

Sets master auth materials. Currently supports changing the admin password or a specific cluster, either via password generation or explicitly setting the password. (clusters.setMasterAuth)

Parameters

string $projectId

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

string $zone

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

string $clusterId

Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.

SetMasterAuthRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation setNetworkPolicy(string $projectId, string $zone, string $clusterId, SetNetworkPolicyRequest $postBody, array $optParams = [])

Enables or disables Network Policy for a cluster. (clusters.setNetworkPolicy)

Parameters

string $projectId

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

string $zone

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

string $clusterId

Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.

SetNetworkPolicyRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation startIpRotation(string $projectId, string $zone, string $clusterId, StartIPRotationRequest $postBody, array $optParams = [])

Starts master IP rotation. (clusters.startIpRotation)

Parameters

string $projectId

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

string $zone

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

string $clusterId

Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.

StartIPRotationRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation update(string $projectId, string $zone, string $clusterId, UpdateClusterRequest $postBody, array $optParams = [])

Updates the settings of a specific cluster. (clusters.update)

Parameters

string $projectId

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

string $zone

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

string $clusterId

Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.

UpdateClusterRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception