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
new KubernetesNodePool(name: string, args: KubernetesNodePoolArgs, opts?: CustomResourceOptions);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);func NewKubernetesNodePool(ctx *Context, name string, args KubernetesNodePoolArgs, opts ...ResourceOption) (*KubernetesNodePool, error)public KubernetesNodePool(string name, KubernetesNodePoolArgs args, CustomResourceOptions? opts = null)- 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:
- Cluster
Id 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.
- Auto
Scale 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.
- Max
Nodes int If auto-scaling is enabled, this represents the maximum number of nodes that the node pool can be scaled up to.
- Min
Nodes 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.
- Node
Count 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.
- List<string>
A list of tag names to be applied to the Kubernetes cluster.
- Cluster
Id 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.
- Auto
Scale 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.
- Max
Nodes int If auto-scaling is enabled, this represents the maximum number of nodes that the node pool can be scaled up to.
- Min
Nodes 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.
- Node
Count 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.
- []string
A list of tag names to be applied to the Kubernetes cluster.
- cluster
Id string The ID of the Kubernetes cluster to which the node pool is associated.
- size
Droplet
Slug The slug identifier for the type of Droplet to be used as workers in the node pool.
- auto
Scale 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.
- max
Nodes number If auto-scaling is enabled, this represents the maximum number of nodes that the node pool can be scaled up to.
- min
Nodes 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.
- node
Count 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.
- 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.
- 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:
- Actual
Node intCount 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.
Digital Ocean. Outputs. Kubernetes Node Pool Node> 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 intCount 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
[]Kubernetes
Node Pool Node 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 numberCount 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
Kubernetes
Node Pool Node[] 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_ floatcount 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[Kubernetes
Node Pool Node] 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): KubernetesNodePoolstatic 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:
- Actual
Node intCount 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 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.
- Max
Nodes int If auto-scaling is enabled, this represents the maximum number of nodes that the node pool can be scaled up to.
- Min
Nodes 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.
- Node
Count 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.
Digital Ocean. Inputs. Kubernetes Node Pool Node Args> 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.
- List<string>
A list of tag names to be applied to the Kubernetes cluster.
- Actual
Node intCount 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 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.
- Max
Nodes int If auto-scaling is enabled, this represents the maximum number of nodes that the node pool can be scaled up to.
- Min
Nodes 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.
- Node
Count 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
[]Kubernetes
Node Pool Node 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.
- []string
A list of tag names to be applied to the Kubernetes cluster.
- actual
Node numberCount A computed field representing the actual number of nodes in the node pool, which is especially useful when auto-scaling is enabled.
- auto
Scale boolean Enable auto-scaling of the number of nodes in the node pool within the given min/max range.
- cluster
Id 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.
- max
Nodes number If auto-scaling is enabled, this represents the maximum number of nodes that the node pool can be scaled up to.
- min
Nodes 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.
- node
Count 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
Kubernetes
Node Pool Node[] 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
Droplet
Slug The slug identifier for the type of Droplet to be used as workers in the node pool.
- string[]
A list of tag names to be applied to the Kubernetes cluster.
- actual_
node_ floatcount 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[Kubernetes
Node Pool Node] 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.
- 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.
- 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
digitaloceanTerraform Provider.