Class NodePool.Builder (2.5.1)

Stay organized with collections Save and categorize content based on your preferences.
public static final class NodePool.Builder extends GeneratedMessageV3.Builder<NodePool.Builder> implements NodePoolOrBuilder

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.

Protobuf type google.container.v1.NodePool

Implements

NodePoolOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllConditions(Iterable<? extends StatusCondition> values)

public NodePool.Builder addAllConditions(Iterable<? extends StatusCondition> values)

Which conditions caused the current node pool state.

repeated .google.container.v1.StatusCondition conditions = 105;

Parameter
NameDescription
valuesIterable<? extends com.google.container.v1.StatusCondition>
Returns
TypeDescription
NodePool.Builder

addAllInstanceGroupUrls(Iterable<String> values)

public NodePool.Builder addAllInstanceGroupUrls(Iterable<String> values)

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

repeated string instance_group_urls = 102;

Parameter
NameDescription
valuesIterable<String>

The instanceGroupUrls to add.

Returns
TypeDescription
NodePool.Builder

This builder for chaining.

addAllLocations(Iterable<String> values)

public NodePool.Builder addAllLocations(Iterable<String> values)

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.

repeated string locations = 13;

Parameter
NameDescription
valuesIterable<String>

The locations to add.

Returns
TypeDescription
NodePool.Builder

This builder for chaining.

addConditions(StatusCondition value)

public NodePool.Builder addConditions(StatusCondition value)

Which conditions caused the current node pool state.

repeated .google.container.v1.StatusCondition conditions = 105;

Parameter
NameDescription
valueStatusCondition
Returns
TypeDescription
NodePool.Builder

addConditions(StatusCondition.Builder builderForValue)

public NodePool.Builder addConditions(StatusCondition.Builder builderForValue)

Which conditions caused the current node pool state.

repeated .google.container.v1.StatusCondition conditions = 105;

Parameter
NameDescription
builderForValueStatusCondition.Builder
Returns
TypeDescription
NodePool.Builder

addConditions(int index, StatusCondition value)

public NodePool.Builder addConditions(int index, StatusCondition value)

Which conditions caused the current node pool state.

repeated .google.container.v1.StatusCondition conditions = 105;

Parameters
NameDescription
indexint
valueStatusCondition
Returns
TypeDescription
NodePool.Builder

addConditions(int index, StatusCondition.Builder builderForValue)

public NodePool.Builder addConditions(int index, StatusCondition.Builder builderForValue)

Which conditions caused the current node pool state.

repeated .google.container.v1.StatusCondition conditions = 105;

Parameters
NameDescription
indexint
builderForValueStatusCondition.Builder
Returns
TypeDescription
NodePool.Builder

addConditionsBuilder()

public StatusCondition.Builder addConditionsBuilder()

Which conditions caused the current node pool state.

repeated .google.container.v1.StatusCondition conditions = 105;

Returns
TypeDescription
StatusCondition.Builder

addConditionsBuilder(int index)

public StatusCondition.Builder addConditionsBuilder(int index)

Which conditions caused the current node pool state.

repeated .google.container.v1.StatusCondition conditions = 105;

Parameter
NameDescription
indexint
Returns
TypeDescription
StatusCondition.Builder

addInstanceGroupUrls(String value)

public NodePool.Builder addInstanceGroupUrls(String value)

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

repeated string instance_group_urls = 102;

Parameter
NameDescription
valueString

The instanceGroupUrls to add.

Returns
TypeDescription
NodePool.Builder

This builder for chaining.

addInstanceGroupUrlsBytes(ByteString value)

public NodePool.Builder addInstanceGroupUrlsBytes(ByteString value)

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

repeated string instance_group_urls = 102;

Parameter
NameDescription
valueByteString

The bytes of the instanceGroupUrls to add.

Returns
TypeDescription
NodePool.Builder

This builder for chaining.

addLocations(String value)

public NodePool.Builder addLocations(String value)

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.

repeated string locations = 13;

Parameter
NameDescription
valueString

The locations to add.

Returns
TypeDescription
NodePool.Builder

This builder for chaining.

addLocationsBytes(ByteString value)

public NodePool.Builder addLocationsBytes(ByteString value)

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.

repeated string locations = 13;

Parameter
NameDescription
valueByteString

The bytes of the locations to add.

Returns
TypeDescription
NodePool.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public NodePool.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
NodePool.Builder
Overrides

build()

public NodePool build()
Returns
TypeDescription
NodePool

buildPartial()

public NodePool buildPartial()
Returns
TypeDescription
NodePool

clear()

public NodePool.Builder clear()
Returns
TypeDescription
NodePool.Builder
Overrides

clearAutoscaling()

public NodePool.Builder clearAutoscaling()

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

.google.container.v1.NodePoolAutoscaling autoscaling = 4;

Returns
TypeDescription
NodePool.Builder

clearConditions()

public NodePool.Builder clearConditions()

Which conditions caused the current node pool state.

repeated .google.container.v1.StatusCondition conditions = 105;

Returns
TypeDescription
NodePool.Builder

clearConfig()

public NodePool.Builder clearConfig()

The node configuration of the pool.

.google.container.v1.NodeConfig config = 2;

Returns
TypeDescription
NodePool.Builder

clearField(Descriptors.FieldDescriptor field)

public NodePool.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
NodePool.Builder
Overrides

clearInitialNodeCount()

public NodePool.Builder clearInitialNodeCount()

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.

int32 initial_node_count = 3;

Returns
TypeDescription
NodePool.Builder

This builder for chaining.

clearInstanceGroupUrls()

public NodePool.Builder clearInstanceGroupUrls()

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

repeated string instance_group_urls = 102;

Returns
TypeDescription
NodePool.Builder

This builder for chaining.

clearLocations()

public NodePool.Builder clearLocations()

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.

repeated string locations = 13;

Returns
TypeDescription
NodePool.Builder

This builder for chaining.

clearManagement()

public NodePool.Builder clearManagement()

NodeManagement configuration for this NodePool.

.google.container.v1.NodeManagement management = 5;

Returns
TypeDescription
NodePool.Builder

clearMaxPodsConstraint()

public NodePool.Builder clearMaxPodsConstraint()

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

.google.container.v1.MaxPodsConstraint max_pods_constraint = 6;

Returns
TypeDescription
NodePool.Builder

clearName()

public NodePool.Builder clearName()

The name of the node pool.

string name = 1;

Returns
TypeDescription
NodePool.Builder

This builder for chaining.

clearNetworkConfig()

public NodePool.Builder clearNetworkConfig()

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

.google.container.v1.NodeNetworkConfig network_config = 14;

Returns
TypeDescription
NodePool.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public NodePool.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
NodePool.Builder
Overrides

clearPodIpv4CidrSize()

public NodePool.Builder clearPodIpv4CidrSize()

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

int32 pod_ipv4_cidr_size = 7;

Returns
TypeDescription
NodePool.Builder

This builder for chaining.

public NodePool.Builder clearSelfLink()

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

string self_link = 100;

Returns
TypeDescription
NodePool.Builder

This builder for chaining.

clearStatus()

public NodePool.Builder clearStatus()

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

.google.container.v1.NodePool.Status status = 103;

Returns
TypeDescription
NodePool.Builder

This builder for chaining.

clearStatusMessage() (deprecated)

public NodePool.Builder clearStatusMessage()

Deprecated. google.container.v1.NodePool.status_message is deprecated. See google/container/v1/cluster_service.proto;l=2958

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

string status_message = 104 [deprecated = true];

Returns
TypeDescription
NodePool.Builder

This builder for chaining.

clearUpdateInfo()

public NodePool.Builder clearUpdateInfo()

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

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

Returns
TypeDescription
NodePool.Builder

clearUpgradeSettings()

public NodePool.Builder clearUpgradeSettings()

Upgrade settings control disruption and speed of the upgrade.

.google.container.v1.NodePool.UpgradeSettings upgrade_settings = 107;

Returns
TypeDescription
NodePool.Builder

clearVersion()

public NodePool.Builder clearVersion()

The version of the Kubernetes of this node.

string version = 101;

Returns
TypeDescription
NodePool.Builder

This builder for chaining.

clone()

public NodePool.Builder clone()
Returns
TypeDescription
NodePool.Builder
Overrides

getAutoscaling()

public NodePoolAutoscaling getAutoscaling()

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

.google.container.v1.NodePoolAutoscaling autoscaling = 4;

Returns
TypeDescription
NodePoolAutoscaling

The autoscaling.

getAutoscalingBuilder()

public NodePoolAutoscaling.Builder getAutoscalingBuilder()

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

.google.container.v1.NodePoolAutoscaling autoscaling = 4;

Returns
TypeDescription
NodePoolAutoscaling.Builder

getAutoscalingOrBuilder()

public NodePoolAutoscalingOrBuilder getAutoscalingOrBuilder()

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

.google.container.v1.NodePoolAutoscaling autoscaling = 4;

Returns
TypeDescription
NodePoolAutoscalingOrBuilder

getConditions(int index)

public StatusCondition getConditions(int index)

Which conditions caused the current node pool state.

repeated .google.container.v1.StatusCondition conditions = 105;

Parameter
NameDescription
indexint
Returns
TypeDescription
StatusCondition

getConditionsBuilder(int index)

public StatusCondition.Builder getConditionsBuilder(int index)

Which conditions caused the current node pool state.

repeated .google.container.v1.StatusCondition conditions = 105;

Parameter
NameDescription
indexint
Returns
TypeDescription
StatusCondition.Builder

getConditionsBuilderList()

public List<StatusCondition.Builder> getConditionsBuilderList()

Which conditions caused the current node pool state.

repeated .google.container.v1.StatusCondition conditions = 105;

Returns
TypeDescription
List<Builder>

getConditionsCount()

public int getConditionsCount()

Which conditions caused the current node pool state.

repeated .google.container.v1.StatusCondition conditions = 105;

Returns
TypeDescription
int

getConditionsList()

public List<StatusCondition> getConditionsList()

Which conditions caused the current node pool state.

repeated .google.container.v1.StatusCondition conditions = 105;

Returns
TypeDescription
List<StatusCondition>

getConditionsOrBuilder(int index)

public StatusConditionOrBuilder getConditionsOrBuilder(int index)

Which conditions caused the current node pool state.

repeated .google.container.v1.StatusCondition conditions = 105;

Parameter
NameDescription
indexint
Returns
TypeDescription
StatusConditionOrBuilder

getConditionsOrBuilderList()

public List<? extends StatusConditionOrBuilder> getConditionsOrBuilderList()

Which conditions caused the current node pool state.

repeated .google.container.v1.StatusCondition conditions = 105;

Returns
TypeDescription
List<? extends com.google.container.v1.StatusConditionOrBuilder>

getConfig()

public NodeConfig getConfig()

The node configuration of the pool.

.google.container.v1.NodeConfig config = 2;

Returns
TypeDescription
NodeConfig

The config.

getConfigBuilder()

public NodeConfig.Builder getConfigBuilder()

The node configuration of the pool.

.google.container.v1.NodeConfig config = 2;

Returns
TypeDescription
NodeConfig.Builder

getConfigOrBuilder()

public NodeConfigOrBuilder getConfigOrBuilder()

The node configuration of the pool.

.google.container.v1.NodeConfig config = 2;

Returns
TypeDescription
NodeConfigOrBuilder

getDefaultInstanceForType()

public NodePool getDefaultInstanceForType()
Returns
TypeDescription
NodePool

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getInitialNodeCount()

public int 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.

int32 initial_node_count = 3;

Returns
TypeDescription
int

The initialNodeCount.

getInstanceGroupUrls(int index)

public String getInstanceGroupUrls(int index)

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

repeated string instance_group_urls = 102;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The instanceGroupUrls at the given index.

getInstanceGroupUrlsBytes(int index)

public ByteString getInstanceGroupUrlsBytes(int index)

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

repeated string instance_group_urls = 102;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the instanceGroupUrls at the given index.

getInstanceGroupUrlsCount()

public int getInstanceGroupUrlsCount()

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

repeated string instance_group_urls = 102;

Returns
TypeDescription
int

The count of instanceGroupUrls.

getInstanceGroupUrlsList()

public ProtocolStringList getInstanceGroupUrlsList()

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

repeated string instance_group_urls = 102;

Returns
TypeDescription
ProtocolStringList

A list containing the instanceGroupUrls.

getLocations(int index)

public String getLocations(int index)

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.

repeated string locations = 13;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The locations at the given index.

getLocationsBytes(int index)

public ByteString getLocationsBytes(int index)

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.

repeated string locations = 13;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the locations at the given index.

getLocationsCount()

public int getLocationsCount()

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.

repeated string locations = 13;

Returns
TypeDescription
int

The count of locations.

getLocationsList()

public ProtocolStringList getLocationsList()

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.

repeated string locations = 13;

Returns
TypeDescription
ProtocolStringList

A list containing the locations.

getManagement()

public NodeManagement getManagement()

NodeManagement configuration for this NodePool.

.google.container.v1.NodeManagement management = 5;

Returns
TypeDescription
NodeManagement

The management.

getManagementBuilder()

public NodeManagement.Builder getManagementBuilder()

NodeManagement configuration for this NodePool.

.google.container.v1.NodeManagement management = 5;

Returns
TypeDescription
NodeManagement.Builder

getManagementOrBuilder()

public NodeManagementOrBuilder getManagementOrBuilder()

NodeManagement configuration for this NodePool.

.google.container.v1.NodeManagement management = 5;

Returns
TypeDescription
NodeManagementOrBuilder

getMaxPodsConstraint()

public MaxPodsConstraint getMaxPodsConstraint()

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

.google.container.v1.MaxPodsConstraint max_pods_constraint = 6;

Returns
TypeDescription
MaxPodsConstraint

The maxPodsConstraint.

getMaxPodsConstraintBuilder()

public MaxPodsConstraint.Builder getMaxPodsConstraintBuilder()

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

.google.container.v1.MaxPodsConstraint max_pods_constraint = 6;

Returns
TypeDescription
MaxPodsConstraint.Builder

getMaxPodsConstraintOrBuilder()

public MaxPodsConstraintOrBuilder getMaxPodsConstraintOrBuilder()

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

.google.container.v1.MaxPodsConstraint max_pods_constraint = 6;

Returns
TypeDescription
MaxPodsConstraintOrBuilder

getName()

public String getName()

The name of the node pool.

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

The name of the node pool.

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

getNetworkConfig()

public NodeNetworkConfig getNetworkConfig()

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

.google.container.v1.NodeNetworkConfig network_config = 14;

Returns
TypeDescription
NodeNetworkConfig

The networkConfig.

getNetworkConfigBuilder()