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 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. |
getName
The name of the node pool.
Returns | |
---|---|
Type | Description |
string |
setName
The name of the node pool.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getConfig
The node configuration of the pool.
Returns | |
---|---|
Type | Description |
Google\Cloud\Container\V1\NodeConfig|null |
hasConfig
clearConfig
setConfig
The node configuration of the pool.
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.
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.
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.
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.
Parameter | |
---|---|
Name | Description |
var |
string[]
|
Returns | |
---|---|
Type | Description |
$this |
getNetworkConfig
Networking configuration for this NodePool. If specified, it overrides the cluster-level defaults.
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.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Container\V1\NodeNetworkConfig
|
Returns | |
---|---|
Type | Description |
$this |
getSelfLink
[Output only] Server-defined URL for the resource.
Returns | |
---|---|
Type | Description |
string |
setSelfLink
[Output only] Server-defined URL for the resource.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getVersion
The version of Kubernetes running on this NodePool's nodes. If unspecified, it defaults as described here.
Returns | |
---|---|
Type | Description |
string |
setVersion
The version of Kubernetes running on this NodePool's nodes. If unspecified, it defaults as described here.
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.
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.
Parameter | |
---|---|
Name | Description |
var |
string[]
|
Returns | |
---|---|
Type | Description |
$this |
getStatus
[Output only] The status of the nodes in this pool instance.
Returns | |
---|---|
Type | Description |
int |
setStatus
[Output only] The status of the nodes in this pool instance.
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.
Returns | |
---|---|
Type | Description |
string |
setStatusMessage
[Output only] Deprecated. Use conditions instead.
Additional information about the current status of this node pool instance, if available.
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.
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.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Container\V1\NodePoolAutoscaling
|
Returns | |
---|---|
Type | Description |
$this |
getManagement
NodeManagement configuration for this NodePool.
Returns | |
---|---|
Type | Description |
Google\Cloud\Container\V1\NodeManagement|null |
hasManagement
clearManagement
setManagement
NodeManagement configuration for this NodePool.
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.
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.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Container\V1\MaxPodsConstraint
|
Returns | |
---|---|
Type | Description |
$this |
getConditions
Which conditions caused the current node pool state.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setConditions
Which conditions caused the current node pool state.
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.
Returns | |
---|---|
Type | Description |
int |
setPodIpv4CidrSize
[Output only] The pod CIDR block size per node in this node pool.
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |
getUpgradeSettings
Upgrade settings control disruption and speed of the upgrade.
Returns | |
---|---|
Type | Description |
Google\Cloud\Container\V1\NodePool\UpgradeSettings|null |
hasUpgradeSettings
clearUpgradeSettings
setUpgradeSettings
Upgrade settings control disruption and speed of the upgrade.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Container\V1\NodePool\UpgradeSettings
|
Returns | |
---|---|
Type | Description |
$this |
getPlacementPolicy
Specifies the node placement policy.
Returns | |
---|---|
Type | Description |
Google\Cloud\Container\V1\NodePool\PlacementPolicy|null |
hasPlacementPolicy
clearPlacementPolicy
setPlacementPolicy
Specifies the node placement policy.
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.
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.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Container\V1\NodePool\UpdateInfo
|
Returns | |
---|---|
Type | Description |
$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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |