Google Cloud Container V1 Client - Class NodePool (1.15.0)

Reference documentation and code samples for the Google Cloud Container V1 Client class NodePool.

NodePool contains the name and configuration for a cluster's node pool.

Node pools are a set of nodes (i.e. VM's), with a common configuration and specification, under the control of the cluster master. They may have a set of Kubernetes labels applied to them, which may be used to reference them during pod scheduling. They may also be resized up or down, to accommodate the workload.

Generated from protobuf message google.container.v1.NodePool

Namespace

Google \ Cloud \ Container \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

The name of the node pool.

↳ config Google\Cloud\Container\V1\NodeConfig

The node configuration of the pool.

↳ initial_node_count int

The initial node count for the pool. You must ensure that your Compute Engine resource quota is sufficient for this number of instances. You must also have available firewall and routes quota.

↳ locations array

The list of Google Compute Engine zones in which the NodePool's nodes should be located. If this value is unspecified during node pool creation, the Cluster.Locations value will be used, instead. Warning: changing node pool locations will result in nodes being added and/or removed.

↳ network_config Google\Cloud\Container\V1\NodeNetworkConfig

Networking configuration for this NodePool. If specified, it overrides the cluster-level defaults.

↳ self_link string

[Output only] Server-defined URL for the resource.

↳ version string

The version of Kubernetes running on this NodePool's nodes. If unspecified, it defaults as described here.

↳ instance_group_urls array

[Output only] The resource URLs of the managed instance groups associated with this node pool. During the node pool blue-green upgrade operation, the URLs contain both blue and green resources.

↳ status int

[Output only] The status of the nodes in this pool instance.

↳ status_message string

[Output only] Deprecated. Use conditions instead. Additional information about the current status of this node pool instance, if available.

↳ autoscaling Google\Cloud\Container\V1\NodePoolAutoscaling

Autoscaler configuration for this NodePool. Autoscaler is enabled only if a valid configuration is present.

↳ management Google\Cloud\Container\V1\NodeManagement

NodeManagement configuration for this NodePool.

↳ max_pods_constraint Google\Cloud\Container\V1\MaxPodsConstraint

The constraint on the maximum number of pods that can be run simultaneously on a node in the node pool.

↳ conditions array<Google\Cloud\Container\V1\StatusCondition>

Which conditions caused the current node pool state.

↳ pod_ipv4_cidr_size int

[Output only] The pod CIDR block size per node in this node pool.

↳ upgrade_settings Google\Cloud\Container\V1\NodePool\UpgradeSettings

Upgrade settings control disruption and speed of the upgrade.

↳ placement_policy Google\Cloud\Container\V1\NodePool\PlacementPolicy

Specifies the node placement policy.

↳ update_info Google\Cloud\Container\V1\NodePool\UpdateInfo

Output only. [Output only] Update info contains relevant information during a node pool update.

↳ etag string

This checksum is computed by the server based on the value of node pool fields, and may be sent on update requests to ensure the client has an up-to-date value before proceeding.

↳ best_effort_provisioning Google\Cloud\Container\V1\BestEffortProvisioning

Enable best effort provisioning for nodes

getName

The name of the node pool.

Returns
TypeDescription
string

setName

The name of the node pool.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getConfig

The node configuration of the pool.

Returns
TypeDescription
Google\Cloud\Container\V1\NodeConfig|null

hasConfig

clearConfig

setConfig

The node configuration of the pool.

Parameter
NameDescription
var Google\Cloud\Container\V1\NodeConfig
Returns
TypeDescription
$this

getInitialNodeCount

The initial node count for the pool. You must ensure that your Compute Engine resource quota is sufficient for this number of instances. You must also have available firewall and routes quota.

Returns
TypeDescription
int

setInitialNodeCount

The initial node count for the pool. You must ensure that your Compute Engine resource quota is sufficient for this number of instances. You must also have available firewall and routes quota.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getLocations

The list of Google Compute Engine zones in which the NodePool's nodes should be located.

If this value is unspecified during node pool creation, the Cluster.Locations value will be used, instead. Warning: changing node pool locations will result in nodes being added and/or removed.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setLocations

The list of Google Compute Engine zones in which the NodePool's nodes should be located.

If this value is unspecified during node pool creation, the Cluster.Locations value will be used, instead. Warning: changing node pool locations will result in nodes being added and/or removed.

Parameter
NameDescription
var string[]
Returns
TypeDescription
$this

getNetworkConfig

Networking configuration for this NodePool. If specified, it overrides the cluster-level defaults.

Returns
TypeDescription
Google\Cloud\Container\V1\NodeNetworkConfig|null

hasNetworkConfig

clearNetworkConfig

setNetworkConfig

Networking configuration for this NodePool. If specified, it overrides the cluster-level defaults.

Parameter
NameDescription
var Google\Cloud\Container\V1\NodeNetworkConfig
Returns
TypeDescription
$this

[Output only] Server-defined URL for the resource.

Returns
TypeDescription
string

[Output only] Server-defined URL for the resource.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getVersion

The version of Kubernetes running on this NodePool's nodes. If unspecified, it defaults as described here.

Returns
TypeDescription
string

setVersion

The version of Kubernetes running on this NodePool's nodes. If unspecified, it defaults as described here.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getInstanceGroupUrls

[Output only] The resource URLs of the managed instance groups associated with this node pool.

During the node pool blue-green upgrade operation, the URLs contain both blue and green resources.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setInstanceGroupUrls

[Output only] The resource URLs of the managed instance groups associated with this node pool.

During the node pool blue-green upgrade operation, the URLs contain both blue and green resources.

Parameter
NameDescription
var string[]
Returns
TypeDescription
$this

getStatus

[Output only] The status of the nodes in this pool instance.

Returns
TypeDescription
int

setStatus

[Output only] The status of the nodes in this pool instance.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getStatusMessage

[Output only] Deprecated. Use conditions instead.

Additional information about the current status of this node pool instance, if available.

Returns
TypeDescription
string

setStatusMessage

[Output only] Deprecated. Use conditions instead.

Additional information about the current status of this node pool instance, if available.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getAutoscaling

Autoscaler configuration for this NodePool. Autoscaler is enabled only if a valid configuration is present.

Returns
TypeDescription
Google\Cloud\Container\V1\NodePoolAutoscaling|null

hasAutoscaling

clearAutoscaling

setAutoscaling

Autoscaler configuration for this NodePool. Autoscaler is enabled only if a valid configuration is present.

Parameter
NameDescription
var Google\Cloud\Container\V1\NodePoolAutoscaling
Returns
TypeDescription
$this

getManagement

NodeManagement configuration for this NodePool.

Returns
TypeDescription
Google\Cloud\Container\V1\NodeManagement|null

hasManagement

clearManagement

setManagement

NodeManagement configuration for this NodePool.

Parameter
NameDescription
var Google\Cloud\Container\V1\NodeManagement
Returns
TypeDescription
$this

getMaxPodsConstraint

The constraint on the maximum number of pods that can be run simultaneously on a node in the node pool.

Returns
TypeDescription
Google\Cloud\Container\V1\MaxPodsConstraint|null

hasMaxPodsConstraint

clearMaxPodsConstraint

setMaxPodsConstraint

The constraint on the maximum number of pods that can be run simultaneously on a node in the node pool.

Parameter
NameDescription
var Google\Cloud\Container\V1\MaxPodsConstraint
Returns
TypeDescription
$this

getConditions

Which conditions caused the current node pool state.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setConditions

Which conditions caused the current node pool state.

Parameter
NameDescription
var array<Google\Cloud\Container\V1\StatusCondition>
Returns
TypeDescription
$this

getPodIpv4CidrSize

[Output only] The pod CIDR block size per node in this node pool.

Returns
TypeDescription
int

setPodIpv4CidrSize

[Output only] The pod CIDR block size per node in this node pool.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getUpgradeSettings

Upgrade settings control disruption and speed of the upgrade.

Returns
TypeDescription
Google\Cloud\Container\V1\NodePool\UpgradeSettings|null

hasUpgradeSettings

clearUpgradeSettings

setUpgradeSettings

Upgrade settings control disruption and speed of the upgrade.

Parameter
NameDescription
var Google\Cloud\Container\V1\NodePool\UpgradeSettings
Returns
TypeDescription
$this

getPlacementPolicy

Specifies the node placement policy.

Returns
TypeDescription
Google\Cloud\Container\V1\NodePool\PlacementPolicy|null

hasPlacementPolicy

clearPlacementPolicy

setPlacementPolicy

Specifies the node placement policy.

Parameter
NameDescription
var Google\Cloud\Container\V1\NodePool\PlacementPolicy
Returns
TypeDescription
$this

getUpdateInfo

Output only. [Output only] Update info contains relevant information during a node pool update.

Returns
TypeDescription
Google\Cloud\Container\V1\NodePool\UpdateInfo|null

hasUpdateInfo

clearUpdateInfo

setUpdateInfo

Output only. [Output only] Update info contains relevant information during a node pool update.

Parameter
NameDescription
var Google\Cloud\Container\V1\NodePool\UpdateInfo
Returns
TypeDescription
$this

getEtag

This checksum is computed by the server based on the value of node pool fields, and may be sent on update requests to ensure the client has an up-to-date value before proceeding.

Returns
TypeDescription
string

setEtag

This checksum is computed by the server based on the value of node pool fields, and may be sent on update requests to ensure the client has an up-to-date value before proceeding.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getBestEffortProvisioning

Enable best effort provisioning for nodes

Returns
TypeDescription
Google\Cloud\Container\V1\BestEffortProvisioning|null

hasBestEffortProvisioning

clearBestEffortProvisioning

setBestEffortProvisioning

Enable best effort provisioning for nodes

Parameter
NameDescription
var Google\Cloud\Container\V1\BestEffortProvisioning
Returns
TypeDescription
$this