Google Cloud Container V1 Client - Class NodePool (1.9.1)

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

Methods

__construct

Constructor.

Parameters
Name Description
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 the Kubernetes of this node.

↳ 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.

getName

The name of the node pool.

Generated from protobuf field string name = 1;

Returns
Type Description
string

setName

The name of the node pool.

Generated from protobuf field string name = 1;

Parameter
Name Description
var string
Returns
Type Description
$this

getConfig

The node configuration of the pool.

Generated from protobuf field .google.container.v1.NodeConfig config = 2;

Returns
Type Description
Google\Cloud\Container\V1\NodeConfig|null

hasConfig

clearConfig

setConfig

The node configuration of the pool.

Generated from protobuf field .google.container.v1.NodeConfig config = 2;

Parameter
Name Description
var Google\Cloud\Container\V1\NodeConfig
Returns
Type Description
$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.

Generated from protobuf field int32 initial_node_count = 3;

Returns
Type Description
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.

Generated from protobuf field int32 initial_node_count = 3;

Parameter
Name Description
var int
Returns
Type Description
$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.

Generated from protobuf field repeated string locations = 13;

Returns
Type Description
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.

Generated from protobuf field repeated string locations = 13;

Parameter
Name Description
var string[]
Returns
Type Description
$this

getNetworkConfig

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

Generated from protobuf field .google.container.v1.NodeNetworkConfig network_config = 14;

Returns
Type Description
Google\Cloud\Container\V1\NodeNetworkConfig|null

hasNetworkConfig

clearNetworkConfig

setNetworkConfig

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

Generated from protobuf field .google.container.v1.NodeNetworkConfig network_config = 14;

Parameter
Name Description
var Google\Cloud\Container\V1\NodeNetworkConfig
Returns
Type Description
$this

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

Generated from protobuf field string self_link = 100;

Returns
Type Description
string

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

Generated from protobuf field string self_link = 100;

Parameter
Name Description
var string
Returns
Type Description
$this

getVersion

The version of the Kubernetes of this node.

Generated from protobuf field string version = 101;

Returns
Type Description
string

setVersion

The version of the Kubernetes of this node.

Generated from protobuf field string version = 101;

Parameter
Name Description
var string
Returns
Type Description
$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.

Generated from protobuf field repeated string instance_group_urls = 102;

Returns
Type Description
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.

Generated from protobuf field repeated string instance_group_urls = 102;

Parameter
Name Description
var string[]
Returns
Type Description
$this

getStatus

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

Generated from protobuf field .google.container.v1.NodePool.Status status = 103;

Returns
Type Description
int

setStatus

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

Generated from protobuf field .google.container.v1.NodePool.Status status = 103;

Parameter
Name Description
var int
Returns
Type Description
$this

getStatusMessage

[Output only] Deprecated. Use conditions instead.

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

Generated from protobuf field string status_message = 104 [deprecated = true];

Returns
Type Description
string

setStatusMessage

[Output only] Deprecated. Use conditions instead.

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

Generated from protobuf field string status_message = 104 [deprecated = true];

Parameter
Name Description
var string
Returns
Type Description
$this

getAutoscaling

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

Generated from protobuf field .google.container.v1.NodePoolAutoscaling autoscaling = 4;

Returns
Type Description
Google\Cloud\Container\V1\NodePoolAutoscaling|null

hasAutoscaling

clearAutoscaling

setAutoscaling

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

Generated from protobuf field .google.container.v1.NodePoolAutoscaling autoscaling = 4;

Parameter
Name Description
var Google\Cloud\Container\V1\NodePoolAutoscaling
Returns
Type Description
$this

getManagement

NodeManagement configuration for this NodePool.

Generated from protobuf field .google.container.v1.NodeManagement management = 5;

Returns
Type Description
Google\Cloud\Container\V1\NodeManagement|null

hasManagement

clearManagement

setManagement

NodeManagement configuration for this NodePool.

Generated from protobuf field .google.container.v1.NodeManagement management = 5;

Parameter
Name Description
var Google\Cloud\Container\V1\NodeManagement
Returns
Type Description
$this

getMaxPodsConstraint

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

Generated from protobuf field .google.container.v1.MaxPodsConstraint max_pods_constraint = 6;

Returns
Type Description
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.

Generated from protobuf field .google.container.v1.MaxPodsConstraint max_pods_constraint = 6;

Parameter
Name Description
var Google\Cloud\Container\V1\MaxPodsConstraint
Returns
Type Description
$this

getConditions

Which conditions caused the current node pool state.

Generated from protobuf field repeated .google.container.v1.StatusCondition conditions = 105;

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setConditions

Which conditions caused the current node pool state.

Generated from protobuf field repeated .google.container.v1.StatusCondition conditions = 105;

Parameter
Name Description
var array<Google\Cloud\Container\V1\StatusCondition>
Returns
Type Description
$this

getPodIpv4CidrSize

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

Generated from protobuf field int32 pod_ipv4_cidr_size = 7;

Returns
Type Description
int

setPodIpv4CidrSize

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

Generated from protobuf field int32 pod_ipv4_cidr_size = 7;

Parameter
Name Description
var int
Returns
Type Description
$this

getUpgradeSettings

Upgrade settings control disruption and speed of the upgrade.

Generated from protobuf field .google.container.v1.NodePool.UpgradeSettings upgrade_settings = 107;

Returns
Type Description
Google\Cloud\Container\V1\NodePool\UpgradeSettings|null

hasUpgradeSettings

clearUpgradeSettings

setUpgradeSettings

Upgrade settings control disruption and speed of the upgrade.

Generated from protobuf field .google.container.v1.NodePool.UpgradeSettings upgrade_settings = 107;

Parameter
Name Description
var Google\Cloud\Container\V1\NodePool\UpgradeSettings
Returns
Type Description
$this

getPlacementPolicy

Specifies the node placement policy.

Generated from protobuf field .google.container.v1.NodePool.PlacementPolicy placement_policy = 108;

Returns
Type Description
Google\Cloud\Container\V1\NodePool\PlacementPolicy|null

hasPlacementPolicy

clearPlacementPolicy

setPlacementPolicy

Specifies the node placement policy.

Generated from protobuf field .google.container.v1.NodePool.PlacementPolicy placement_policy = 108;

Parameter
Name Description
var Google\Cloud\Container\V1\NodePool\PlacementPolicy
Returns
Type Description
$this

getUpdateInfo

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

Generated from protobuf field .google.container.v1.NodePool.UpdateInfo update_info = 109 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Google\Cloud\Container\V1\NodePool\UpdateInfo|null

hasUpdateInfo

clearUpdateInfo

setUpdateInfo

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

Generated from protobuf field .google.container.v1.NodePool.UpdateInfo update_info = 109 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
var Google\Cloud\Container\V1\NodePool\UpdateInfo
Returns
Type Description
$this