Class 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,
});
}
}
Inherited Members
Namespace: Pulumi.DigitalOcean
Assembly: Pulumi.DigitalOcean.dll
Syntax
public class KubernetesNodePool : CustomResource
Constructors
View SourceKubernetesNodePool(String, KubernetesNodePoolArgs, CustomResourceOptions)
Create a KubernetesNodePool resource with the given unique name, arguments, and options.
Declaration
public KubernetesNodePool(string name, KubernetesNodePoolArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| KubernetesNodePoolArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceActualNodeCount
A computed field representing the actual number of nodes in the node pool, which is especially useful when auto-scaling is enabled.
Declaration
public Output<int> ActualNodeCount { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
AutoScale
Enable auto-scaling of the number of nodes in the node pool within the given min/max range.
Declaration
public Output<bool?> AutoScale { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
ClusterId
The ID of the Kubernetes cluster to which the node pool is associated.
Declaration
public Output<string> ClusterId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Labels
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.
Declaration
public Output<ImmutableDictionary<string, string>> Labels { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.String>> |
MaxNodes
If auto-scaling is enabled, this represents the maximum number of nodes that the node pool can be scaled up to.
Declaration
public Output<int?> MaxNodes { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
MinNodes
If auto-scaling is enabled, this represents the minimum number of nodes that the node pool can be scaled down to.
Declaration
public Output<int?> MinNodes { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
Name
A name for the node pool.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
NodeCount
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.
Declaration
public Output<int?> NodeCount { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
Nodes
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 dropletcreated_at- The date and time when the node was created.updated_at- The date and time when the node was last updated.
Declaration
public Output<ImmutableArray<KubernetesNodePoolNode>> Nodes { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<KubernetesNodePoolNode>> |
Size
The slug identifier for the type of Droplet to be used as workers in the node pool.
Declaration
public Output<string> Size { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Tags
A list of tag names to be applied to the Kubernetes cluster.
Declaration
public Output<ImmutableArray<string>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Methods
View SourceGet(String, Input<String>, KubernetesNodePoolState, CustomResourceOptions)
Get an existing KubernetesNodePool resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static KubernetesNodePool Get(string name, Input<string> id, KubernetesNodePoolState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| KubernetesNodePoolState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| KubernetesNodePool |