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
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 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
TypeDescription
string

setName

The name of the node pool.

Generated from protobuf field string name = 1;

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getConfig

The node configuration of the pool.

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

Returns
TypeDescription
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
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.

Generated from protobuf field int32 initial_node_count = 3;

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.

Generated from protobuf field int32 initial_node_count = 3;

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.

Generated from protobuf field repeated string locations = 13;

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.

Generated from protobuf field repeated string locations = 13;

Parameter
NameDescription
var string[]
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var Google\Cloud\Container\V1\NodeNetworkConfig
Returns
TypeDescription
$this

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

Generated from protobuf field string self_link = 100;

Returns
TypeDescription
string

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

Generated from protobuf field string self_link = 100;

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getVersion

The version of the Kubernetes of this node.

Generated from protobuf field string version = 101;

Returns
TypeDescription
string

setVersion

The version of the Kubernetes of this node.

Generated from protobuf field string version = 101;

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.

Generated from protobuf field repeated string instance_group_urls = 102;

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.

Generated from protobuf field repeated string instance_group_urls = 102;

Parameter
NameDescription
var string[]
Returns
TypeDescription
$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
TypeDescription
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
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.

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

Returns
TypeDescription
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
NameDescription
var string
Returns
TypeDescription
$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
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.

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

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

getManagement

NodeManagement configuration for this NodePool.

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

Returns
TypeDescription
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
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.

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

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.

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

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

getConditions

Which conditions caused the current node pool state.

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

Returns
TypeDescription
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
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.

Generated from protobuf field int32 pod_ipv4_cidr_size = 7;

Returns
TypeDescription
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
NameDescription
var int
Returns
TypeDescription
$this

getUpgradeSettings

Upgrade settings control disruption and speed of the upgrade.

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

Returns
TypeDescription
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
NameDescription
var Google\Cloud\Container\V1\NodePool\UpgradeSettings
Returns
TypeDescription
$this

getPlacementPolicy

Specifies the node placement policy.

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

Returns
TypeDescription
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
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.

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

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.

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

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