KubernetesNodePool

Provides a DigitalOcean Kubernetes node pool resource. While the default node pool must be defined in the digitalocean..KubernetesCluster resource, this resource can be used to add additional ones to a cluster.

Example Usage

Autoscaling Example

using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;

class MyStack : Stack
{
    public MyStack()
    {
        var autoscale_pool_01 = new DigitalOcean.KubernetesNodePool("autoscale-pool-01", new DigitalOcean.KubernetesNodePoolArgs
        {
            ClusterId = digitalocean_kubernetes_cluster.Foo.Id,
            Size = "s-1vcpu-2gb",
            AutoScale = true,
            MinNodes = 0,
            MaxNodes = 5,
        });
    }

}

Coming soon!

import pulumi
import pulumi_digitalocean as digitalocean

autoscale_pool_01 = digitalocean.KubernetesNodePool("autoscale-pool-01",
    cluster_id=digitalocean_kubernetes_cluster["foo"]["id"],
    size="s-1vcpu-2gb",
    auto_scale=True,
    min_nodes=0,
    max_nodes=5)
import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";

const autoscale_pool_01 = new digitalocean.KubernetesNodePool("autoscale-pool-01", {
    clusterId: digitalocean_kubernetes_cluster.foo.id,
    size: "s-1vcpu-2gb",
    autoScale: true,
    minNodes: 0,
    maxNodes: 5,
});

Create a KubernetesNodePool Resource

def KubernetesNodePool(resource_name, opts=None, auto_scale=None, cluster_id=None, labels=None, max_nodes=None, min_nodes=None, name=None, node_count=None, size=None, tags=None, __props__=None);
name string
The unique name of the resource.
args KubernetesNodePoolArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args KubernetesNodePoolArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args KubernetesNodePoolArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

KubernetesNodePool Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The KubernetesNodePool resource accepts the following input properties:

ClusterId string

The ID of the Kubernetes cluster to which the node pool is associated.

Size string

The slug identifier for the type of Droplet to be used as workers in the node pool.

AutoScale bool

Enable auto-scaling of the number of nodes in the node pool within the given min/max range.

Labels Dictionary<string, string>

A map of key/value pairs to apply to nodes in the pool. The labels are exposed in the Kubernetes API as labels in the metadata of the corresponding Node resources.

MaxNodes int

If auto-scaling is enabled, this represents the maximum number of nodes that the node pool can be scaled up to.

MinNodes int

If auto-scaling is enabled, this represents the minimum number of nodes that the node pool can be scaled down to.

Name string

A name for the node pool.

NodeCount int

The number of Droplet instances in the node pool. If auto-scaling is enabled, this should only be set if the desired result is to explicitly reset the number of nodes to this value. If auto-scaling is enabled, and the node count is outside of the given min/max range, it will use the min nodes value.

Tags List<string>

A list of tag names to be applied to the Kubernetes cluster.

ClusterId string

The ID of the Kubernetes cluster to which the node pool is associated.

Size string

The slug identifier for the type of Droplet to be used as workers in the node pool.

AutoScale bool

Enable auto-scaling of the number of nodes in the node pool within the given min/max range.

Labels map[string]string

A map of key/value pairs to apply to nodes in the pool. The labels are exposed in the Kubernetes API as labels in the metadata of the corresponding Node resources.

MaxNodes int

If auto-scaling is enabled, this represents the maximum number of nodes that the node pool can be scaled up to.

MinNodes int

If auto-scaling is enabled, this represents the minimum number of nodes that the node pool can be scaled down to.

Name string

A name for the node pool.

NodeCount int

The number of Droplet instances in the node pool. If auto-scaling is enabled, this should only be set if the desired result is to explicitly reset the number of nodes to this value. If auto-scaling is enabled, and the node count is outside of the given min/max range, it will use the min nodes value.

Tags []string

A list of tag names to be applied to the Kubernetes cluster.

clusterId string

The ID of the Kubernetes cluster to which the node pool is associated.

size DropletSlug

The slug identifier for the type of Droplet to be used as workers in the node pool.

autoScale boolean

Enable auto-scaling of the number of nodes in the node pool within the given min/max range.

labels {[key: string]: string}

A map of key/value pairs to apply to nodes in the pool. The labels are exposed in the Kubernetes API as labels in the metadata of the corresponding Node resources.

maxNodes number

If auto-scaling is enabled, this represents the maximum number of nodes that the node pool can be scaled up to.

minNodes number

If auto-scaling is enabled, this represents the minimum number of nodes that the node pool can be scaled down to.

name string

A name for the node pool.

nodeCount number

The number of Droplet instances in the node pool. If auto-scaling is enabled, this should only be set if the desired result is to explicitly reset the number of nodes to this value. If auto-scaling is enabled, and the node count is outside of the given min/max range, it will use the min nodes value.

tags string[]

A list of tag names to be applied to the Kubernetes cluster.

cluster_id str

The ID of the Kubernetes cluster to which the node pool is associated.

size str

The slug identifier for the type of Droplet to be used as workers in the node pool.

auto_scale bool

Enable auto-scaling of the number of nodes in the node pool within the given min/max range.

labels Dict[str, str]

A map of key/value pairs to apply to nodes in the pool. The labels are exposed in the Kubernetes API as labels in the metadata of the corresponding Node resources.

max_nodes float

If auto-scaling is enabled, this represents the maximum number of nodes that the node pool can be scaled up to.

min_nodes float

If auto-scaling is enabled, this represents the minimum number of nodes that the node pool can be scaled down to.

name str

A name for the node pool.

node_count float

The number of Droplet instances in the node pool. If auto-scaling is enabled, this should only be set if the desired result is to explicitly reset the number of nodes to this value. If auto-scaling is enabled, and the node count is outside of the given min/max range, it will use the min nodes value.

tags List[str]

A list of tag names to be applied to the Kubernetes cluster.

Outputs

All input properties are implicitly available as output properties. Additionally, the KubernetesNodePool resource produces the following output properties:

ActualNodeCount int

A computed field representing the actual number of nodes in the node pool, which is especially useful when auto-scaling is enabled.

Id string
The provider-assigned unique ID for this managed resource.
Nodes List<Pulumi.DigitalOcean.Outputs.KubernetesNodePoolNode>

A list of nodes in the pool. Each node exports the following attributes: - id - A unique ID that can be used to identify and reference the node. - name - The auto-generated name for the node. - status - A string indicating the current status of the individual node. - droplet_id - The id of the node’s droplet - created_at - The date and time when the node was created. - updated_at - The date and time when the node was last updated.

ActualNodeCount int

A computed field representing the actual number of nodes in the node pool, which is especially useful when auto-scaling is enabled.

Id string
The provider-assigned unique ID for this managed resource.
Nodes []KubernetesNodePoolNode

A list of nodes in the pool. Each node exports the following attributes: - id - A unique ID that can be used to identify and reference the node. - name - The auto-generated name for the node. - status - A string indicating the current status of the individual node. - droplet_id - The id of the node’s droplet - created_at - The date and time when the node was created. - updated_at - The date and time when the node was last updated.

actualNodeCount number

A computed field representing the actual number of nodes in the node pool, which is especially useful when auto-scaling is enabled.

id string
The provider-assigned unique ID for this managed resource.
nodes KubernetesNodePoolNode[]

A list of nodes in the pool. Each node exports the following attributes: - id - A unique ID that can be used to identify and reference the node. - name - The auto-generated name for the node. - status - A string indicating the current status of the individual node. - droplet_id - The id of the node’s droplet - created_at - The date and time when the node was created. - updated_at - The date and time when the node was last updated.

actual_node_count float

A computed field representing the actual number of nodes in the node pool, which is especially useful when auto-scaling is enabled.

id str
The provider-assigned unique ID for this managed resource.
nodes List[KubernetesNodePoolNode]

A list of nodes in the pool. Each node exports the following attributes: - id - A unique ID that can be used to identify and reference the node. - name - The auto-generated name for the node. - status - A string indicating the current status of the individual node. - droplet_id - The id of the node’s droplet - created_at - The date and time when the node was created. - updated_at - The date and time when the node was last updated.

Look up an Existing KubernetesNodePool Resource

Get an existing KubernetesNodePool resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: KubernetesNodePoolState, opts?: CustomResourceOptions): KubernetesNodePool
static get(resource_name, id, opts=None, actual_node_count=None, auto_scale=None, cluster_id=None, labels=None, max_nodes=None, min_nodes=None, name=None, node_count=None, nodes=None, size=None, tags=None, __props__=None);
func GetKubernetesNodePool(ctx *Context, name string, id IDInput, state *KubernetesNodePoolState, opts ...ResourceOption) (*KubernetesNodePool, error)
public static KubernetesNodePool Get(string name, Input<string> id, KubernetesNodePoolState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

ActualNodeCount int

A computed field representing the actual number of nodes in the node pool, which is especially useful when auto-scaling is enabled.

AutoScale bool

Enable auto-scaling of the number of nodes in the node pool within the given min/max range.

ClusterId string

The ID of the Kubernetes cluster to which the node pool is associated.

Labels Dictionary<string, string>

A map of key/value pairs to apply to nodes in the pool. The labels are exposed in the Kubernetes API as labels in the metadata of the corresponding Node resources.

MaxNodes int

If auto-scaling is enabled, this represents the maximum number of nodes that the node pool can be scaled up to.

MinNodes int

If auto-scaling is enabled, this represents the minimum number of nodes that the node pool can be scaled down to.

Name string

A name for the node pool.

NodeCount int

The number of Droplet instances in the node pool. If auto-scaling is enabled, this should only be set if the desired result is to explicitly reset the number of nodes to this value. If auto-scaling is enabled, and the node count is outside of the given min/max range, it will use the min nodes value.

Nodes List<Pulumi.DigitalOcean.Inputs.KubernetesNodePoolNodeArgs>

A list of nodes in the pool. Each node exports the following attributes: - id - A unique ID that can be used to identify and reference the node. - name - The auto-generated name for the node. - status - A string indicating the current status of the individual node. - droplet_id - The id of the node’s droplet - created_at - The date and time when the node was created. - updated_at - The date and time when the node was last updated.

Size string

The slug identifier for the type of Droplet to be used as workers in the node pool.

Tags List<string>

A list of tag names to be applied to the Kubernetes cluster.

ActualNodeCount int

A computed field representing the actual number of nodes in the node pool, which is especially useful when auto-scaling is enabled.

AutoScale bool

Enable auto-scaling of the number of nodes in the node pool within the given min/max range.

ClusterId string

The ID of the Kubernetes cluster to which the node pool is associated.

Labels map[string]string

A map of key/value pairs to apply to nodes in the pool. The labels are exposed in the Kubernetes API as labels in the metadata of the corresponding Node resources.

MaxNodes int

If auto-scaling is enabled, this represents the maximum number of nodes that the node pool can be scaled up to.

MinNodes int

If auto-scaling is enabled, this represents the minimum number of nodes that the node pool can be scaled down to.

Name string

A name for the node pool.

NodeCount int

The number of Droplet instances in the node pool. If auto-scaling is enabled, this should only be set if the desired result is to explicitly reset the number of nodes to this value. If auto-scaling is enabled, and the node count is outside of the given min/max range, it will use the min nodes value.

Nodes []KubernetesNodePoolNode

A list of nodes in the pool. Each node exports the following attributes: - id - A unique ID that can be used to identify and reference the node. - name - The auto-generated name for the node. - status - A string indicating the current status of the individual node. - droplet_id - The id of the node’s droplet - created_at - The date and time when the node was created. - updated_at - The date and time when the node was last updated.

Size string

The slug identifier for the type of Droplet to be used as workers in the node pool.

Tags []string

A list of tag names to be applied to the Kubernetes cluster.

actualNodeCount number

A computed field representing the actual number of nodes in the node pool, which is especially useful when auto-scaling is enabled.

autoScale boolean

Enable auto-scaling of the number of nodes in the node pool within the given min/max range.

clusterId string

The ID of the Kubernetes cluster to which the node pool is associated.

labels {[key: string]: string}

A map of key/value pairs to apply to nodes in the pool. The labels are exposed in the Kubernetes API as labels in the metadata of the corresponding Node resources.

maxNodes number

If auto-scaling is enabled, this represents the maximum number of nodes that the node pool can be scaled up to.

minNodes number

If auto-scaling is enabled, this represents the minimum number of nodes that the node pool can be scaled down to.

name string

A name for the node pool.

nodeCount number

The number of Droplet instances in the node pool. If auto-scaling is enabled, this should only be set if the desired result is to explicitly reset the number of nodes to this value. If auto-scaling is enabled, and the node count is outside of the given min/max range, it will use the min nodes value.

nodes KubernetesNodePoolNode[]

A list of nodes in the pool. Each node exports the following attributes: - id - A unique ID that can be used to identify and reference the node. - name - The auto-generated name for the node. - status - A string indicating the current status of the individual node. - droplet_id - The id of the node’s droplet - created_at - The date and time when the node was created. - updated_at - The date and time when the node was last updated.

size DropletSlug

The slug identifier for the type of Droplet to be used as workers in the node pool.

tags string[]

A list of tag names to be applied to the Kubernetes cluster.

actual_node_count float

A computed field representing the actual number of nodes in the node pool, which is especially useful when auto-scaling is enabled.

auto_scale bool

Enable auto-scaling of the number of nodes in the node pool within the given min/max range.

cluster_id str

The ID of the Kubernetes cluster to which the node pool is associated.

labels Dict[str, str]

A map of key/value pairs to apply to nodes in the pool. The labels are exposed in the Kubernetes API as labels in the metadata of the corresponding Node resources.

max_nodes float

If auto-scaling is enabled, this represents the maximum number of nodes that the node pool can be scaled up to.

min_nodes float

If auto-scaling is enabled, this represents the minimum number of nodes that the node pool can be scaled down to.

name str

A name for the node pool.

node_count float

The number of Droplet instances in the node pool. If auto-scaling is enabled, this should only be set if the desired result is to explicitly reset the number of nodes to this value. If auto-scaling is enabled, and the node count is outside of the given min/max range, it will use the min nodes value.

nodes List[KubernetesNodePoolNode]

A list of nodes in the pool. Each node exports the following attributes: - id - A unique ID that can be used to identify and reference the node. - name - The auto-generated name for the node. - status - A string indicating the current status of the individual node. - droplet_id - The id of the node’s droplet - created_at - The date and time when the node was created. - updated_at - The date and time when the node was last updated.

size str

The slug identifier for the type of Droplet to be used as workers in the node pool.

tags List[str]

A list of tag names to be applied to the Kubernetes cluster.

Supporting Types

KubernetesNodePoolNode

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

CreatedAt string
DropletId string
Id string

A unique ID that can be used to identify and reference the node pool.

Name string

A name for the node pool.

Status string
UpdatedAt string
CreatedAt string
DropletId string
Id string

A unique ID that can be used to identify and reference the node pool.

Name string

A name for the node pool.

Status string
UpdatedAt string
createdAt string
dropletId string
id string

A unique ID that can be used to identify and reference the node pool.

name string

A name for the node pool.

status string
updatedAt string
created_at str
droplet_id str
id str

A unique ID that can be used to identify and reference the node pool.

name str

A name for the node pool.

status str
updated_at str

Package Details

Repository
https://github.com/pulumi/pulumi-digitalocean
License
Apache-2.0
Notes
This Pulumi package is based on the digitalocean Terraform Provider.