class ProjectsLocationsClusters extends Resource (View source)

The "clusters" collection of methods.

Typical usage is:

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

Methods

checkAutopilotCompatibility(string $name, array $optParams = [])

Checks the cluster compatibility with Autopilot mode, and returns a list of compatibility issues. (clusters.checkAutopilotCompatibility)

completeIpRotation(string $name, CompleteIPRotationRequest $postBody, array $optParams = [])

Completes master IP rotation. (clusters.completeIpRotation)

create(string $parent, 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 $name, array $optParams = [])

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

get(string $name, array $optParams = [])

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

getJwks(string $parent, array $optParams = [])

Gets the public component of the cluster signing keys in JSON Web Key format.

listProjectsLocationsClusters(string $parent, array $optParams = [])

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

setAddons(string $name, SetAddonsConfigRequest $postBody, array $optParams = [])

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

setLegacyAbac(string $name, SetLegacyAbacRequest $postBody, array $optParams = [])

Enables or disables the ABAC authorization mechanism on a cluster.

setLocations(string $name, SetLocationsRequest $postBody, array $optParams = [])

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

setLogging(string $name, SetLoggingServiceRequest $postBody, array $optParams = [])

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

setMaintenancePolicy(string $name, SetMaintenancePolicyRequest $postBody, array $optParams = [])

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

setMasterAuth(string $name, 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)

setMonitoring(string $name, SetMonitoringServiceRequest $postBody, array $optParams = [])

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

setNetworkPolicy(string $name, SetNetworkPolicyRequest $postBody, array $optParams = [])

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

setResourceLabels(string $name, SetLabelsRequest $postBody, array $optParams = [])

Sets labels on a cluster. (clusters.setResourceLabels)

startIpRotation(string $name, StartIPRotationRequest $postBody, array $optParams = [])

Starts master IP rotation. (clusters.startIpRotation)

update(string $name, UpdateClusterRequest $postBody, array $optParams = [])

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

updateMaster(string $name, UpdateMasterRequest $postBody, array $optParams = [])

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

Details

CheckAutopilotCompatibilityResponse checkAutopilotCompatibility(string $name, array $optParams = [])

Checks the cluster compatibility with Autopilot mode, and returns a list of compatibility issues. (clusters.checkAutopilotCompatibility)

Parameters

string $name

The name (project, location, cluster) of the cluster to retrieve. Specified in the format projects/locations/clusters.

array $optParams

Optional parameters.

Return Value

CheckAutopilotCompatibilityResponse

Exceptions

Exception

Operation completeIpRotation(string $name, CompleteIPRotationRequest $postBody, array $optParams = [])

Completes master IP rotation. (clusters.completeIpRotation)

Parameters

string $name

The name (project, location, cluster name) of the cluster to complete IP rotation. Specified in the format projects/locations/clusters.

CompleteIPRotationRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation create(string $parent, 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 $parent

The parent (project and location) where the cluster will be created. Specified in the format projects/locations.

CreateClusterRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation delete(string $name, 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 $name

The name (project, location, cluster) of the cluster to delete. Specified in the format projects/locations/clusters.

array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Cluster get(string $name, array $optParams = [])

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

Parameters

string $name

The name (project, location, cluster) of the cluster to retrieve. Specified in the format projects/locations/clusters.

array $optParams

Optional parameters.

Return Value

Cluster

Exceptions

Exception

GetJSONWebKeysResponse getJwks(string $parent, array $optParams = [])

Gets the public component of the cluster signing keys in JSON Web Key format.

(clusters.getJwks)

Parameters

string $parent

The cluster (project, location, cluster name) to get keys for. Specified in the format projects/locations/clusters.

array $optParams

Optional parameters.

Return Value

GetJSONWebKeysResponse

Exceptions

Exception

ListClustersResponse listProjectsLocationsClusters(string $parent, array $optParams = [])

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

Parameters

string $parent

The parent (project and location) where the clusters will be listed. Specified in the format projects/locations. Location "-" matches all zones and all regions.

array $optParams

Optional parameters.

Return Value

ListClustersResponse

Exceptions

Exception

Operation setAddons(string $name, SetAddonsConfigRequest $postBody, array $optParams = [])

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

Parameters

string $name

The name (project, location, cluster) of the cluster to set addons. Specified in the format projects/locations/clusters.

SetAddonsConfigRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation setLegacyAbac(string $name, SetLegacyAbacRequest $postBody, array $optParams = [])

Enables or disables the ABAC authorization mechanism on a cluster.

(clusters.setLegacyAbac)

Parameters

string $name

The name (project, location, cluster name) of the cluster to set legacy abac. Specified in the format projects/locations/clusters.

SetLegacyAbacRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation setLocations(string $name, SetLocationsRequest $postBody, array $optParams = [])

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

(clusters.setLocations)

Parameters

string $name

The name (project, location, cluster) of the cluster to set locations. Specified in the format projects/locations/clusters.

SetLocationsRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation setLogging(string $name, SetLoggingServiceRequest $postBody, array $optParams = [])

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

Parameters

string $name

The name (project, location, cluster) of the cluster to set logging. Specified in the format projects/locations/clusters.

SetLoggingServiceRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation setMaintenancePolicy(string $name, SetMaintenancePolicyRequest $postBody, array $optParams = [])

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

Parameters

string $name

The name (project, location, cluster name) of the cluster to set maintenance policy. Specified in the format projects/locations/clusters.

SetMaintenancePolicyRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation setMasterAuth(string $name, 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 $name

The name (project, location, cluster) of the cluster to set auth. Specified in the format projects/locations/clusters.

SetMasterAuthRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation setMonitoring(string $name, SetMonitoringServiceRequest $postBody, array $optParams = [])

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

Parameters

string $name

The name (project, location, cluster) of the cluster to set monitoring. Specified in the format projects/locations/clusters.

SetMonitoringServiceRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation setNetworkPolicy(string $name, SetNetworkPolicyRequest $postBody, array $optParams = [])

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

Parameters

string $name

The name (project, location, cluster name) of the cluster to set networking policy. Specified in the format projects/locations/clusters.

SetNetworkPolicyRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation setResourceLabels(string $name, SetLabelsRequest $postBody, array $optParams = [])

Sets labels on a cluster. (clusters.setResourceLabels)

Parameters

string $name

The name (project, location, cluster name) of the cluster to set labels. Specified in the format projects/locations/clusters.

SetLabelsRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation startIpRotation(string $name, StartIPRotationRequest $postBody, array $optParams = [])

Starts master IP rotation. (clusters.startIpRotation)

Parameters

string $name

The name (project, location, cluster name) of the cluster to start IP rotation. Specified in the format projects/locations/clusters.

StartIPRotationRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation update(string $name, UpdateClusterRequest $postBody, array $optParams = [])

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

Parameters

string $name

The name (project, location, cluster) of the cluster to update. Specified in the format projects/locations/clusters.

UpdateClusterRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation updateMaster(string $name, UpdateMasterRequest $postBody, array $optParams = [])

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

Parameters

string $name

The name (project, location, cluster) of the cluster to update. Specified in the format projects/locations/clusters.

UpdateMasterRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception