1. Packages
  2. Symbiosis
  3. API Docs
  4. NodePool
Symbiosis v1.0.4 published on Thursday, Mar 16, 2023 by Symbiosis

symbiosis.NodePool

Explore with Pulumi AI

Creates node pools for Kubernetes clusters in Symbiosis.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Symbiosis = Symbiosis.Pulumi.Symbiosis;

return await Deployment.RunAsync(() => 
{
    var exampleCluster = new Symbiosis.Cluster("exampleCluster", new()
    {
        Region = "germany-1",
    });

    var exampleNodePool = new Symbiosis.NodePool("exampleNodePool", new()
    {
        Cluster = exampleCluster.Name,
        NodeType = "general-1",
        Quantity = 6,
    });

});
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/symbiosis-cloud/pulumi-symbiosis/sdk/go/symbiosis"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleCluster, err := symbiosis.NewCluster(ctx, "exampleCluster", &symbiosis.ClusterArgs{
			Region: pulumi.String("germany-1"),
		})
		if err != nil {
			return err
		}
		_, err = symbiosis.NewNodePool(ctx, "exampleNodePool", &symbiosis.NodePoolArgs{
			Cluster:  exampleCluster.Name,
			NodeType: pulumi.String("general-1"),
			Quantity: pulumi.Int(6),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.symbiosis.Cluster;
import com.pulumi.symbiosis.ClusterArgs;
import com.pulumi.symbiosis.NodePool;
import com.pulumi.symbiosis.NodePoolArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var exampleCluster = new Cluster("exampleCluster", ClusterArgs.builder()        
            .region("germany-1")
            .build());

        var exampleNodePool = new NodePool("exampleNodePool", NodePoolArgs.builder()        
            .cluster(exampleCluster.name())
            .nodeType("general-1")
            .quantity(6)
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as symbiosis from "@symbiosis-cloud/symbiosis-pulumi";

const exampleCluster = new symbiosis.Cluster("exampleCluster", {region: "germany-1"});
const exampleNodePool = new symbiosis.NodePool("exampleNodePool", {
    cluster: exampleCluster.name,
    nodeType: "general-1",
    quantity: 6,
});
Copy
import pulumi
import symbiosis_pulumi as symbiosis

example_cluster = symbiosis.Cluster("exampleCluster", region="germany-1")
example_node_pool = symbiosis.NodePool("exampleNodePool",
    cluster=example_cluster.name,
    node_type="general-1",
    quantity=6)
Copy
resources:
  exampleCluster:
    type: symbiosis:Cluster
    properties:
      region: germany-1
  exampleNodePool:
    type: symbiosis:NodePool
    properties:
      cluster: ${exampleCluster.name}
      nodeType: general-1
      quantity: 6
Copy

Create NodePool Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new NodePool(name: string, args: NodePoolArgs, opts?: CustomResourceOptions);
@overload
def NodePool(resource_name: str,
             args: NodePoolArgs,
             opts: Optional[ResourceOptions] = None)

@overload
def NodePool(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             cluster: Optional[str] = None,
             node_type: Optional[str] = None,
             quantity: Optional[int] = None,
             autoscaling: Optional[NodePoolAutoscalingArgs] = None,
             labels: Optional[Mapping[str, str]] = None,
             name: Optional[str] = None,
             taints: Optional[Sequence[NodePoolTaintArgs]] = None)
func NewNodePool(ctx *Context, name string, args NodePoolArgs, opts ...ResourceOption) (*NodePool, error)
public NodePool(string name, NodePoolArgs args, CustomResourceOptions? opts = null)
public NodePool(String name, NodePoolArgs args)
public NodePool(String name, NodePoolArgs args, CustomResourceOptions options)
type: symbiosis:NodePool
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. NodePoolArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. NodePoolArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. NodePoolArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. NodePoolArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. NodePoolArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var nodePoolResource = new Symbiosis.NodePool("nodePoolResource", new()
{
    Cluster = "string",
    NodeType = "string",
    Quantity = 0,
    Autoscaling = new Symbiosis.Inputs.NodePoolAutoscalingArgs
    {
        Enabled = false,
        MaxSize = 0,
        MinSize = 0,
    },
    Labels = 
    {
        { "string", "string" },
    },
    Name = "string",
    Taints = new[]
    {
        new Symbiosis.Inputs.NodePoolTaintArgs
        {
            Effect = "string",
            Key = "string",
            Value = "string",
        },
    },
});
Copy
example, err := symbiosis.NewNodePool(ctx, "nodePoolResource", &symbiosis.NodePoolArgs{
	Cluster:  pulumi.String("string"),
	NodeType: pulumi.String("string"),
	Quantity: pulumi.Int(0),
	Autoscaling: &symbiosis.NodePoolAutoscalingArgs{
		Enabled: pulumi.Bool(false),
		MaxSize: pulumi.Int(0),
		MinSize: pulumi.Int(0),
	},
	Labels: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Name: pulumi.String("string"),
	Taints: symbiosis.NodePoolTaintArray{
		&symbiosis.NodePoolTaintArgs{
			Effect: pulumi.String("string"),
			Key:    pulumi.String("string"),
			Value:  pulumi.String("string"),
		},
	},
})
Copy
var nodePoolResource = new NodePool("nodePoolResource", NodePoolArgs.builder()
    .cluster("string")
    .nodeType("string")
    .quantity(0)
    .autoscaling(NodePoolAutoscalingArgs.builder()
        .enabled(false)
        .maxSize(0)
        .minSize(0)
        .build())
    .labels(Map.of("string", "string"))
    .name("string")
    .taints(NodePoolTaintArgs.builder()
        .effect("string")
        .key("string")
        .value("string")
        .build())
    .build());
Copy
node_pool_resource = symbiosis.NodePool("nodePoolResource",
    cluster="string",
    node_type="string",
    quantity=0,
    autoscaling={
        "enabled": False,
        "max_size": 0,
        "min_size": 0,
    },
    labels={
        "string": "string",
    },
    name="string",
    taints=[{
        "effect": "string",
        "key": "string",
        "value": "string",
    }])
Copy
const nodePoolResource = new symbiosis.NodePool("nodePoolResource", {
    cluster: "string",
    nodeType: "string",
    quantity: 0,
    autoscaling: {
        enabled: false,
        maxSize: 0,
        minSize: 0,
    },
    labels: {
        string: "string",
    },
    name: "string",
    taints: [{
        effect: "string",
        key: "string",
        value: "string",
    }],
});
Copy
type: symbiosis:NodePool
properties:
    autoscaling:
        enabled: false
        maxSize: 0
        minSize: 0
    cluster: string
    labels:
        string: string
    name: string
    nodeType: string
    quantity: 0
    taints:
        - effect: string
          key: string
          value: string
Copy

NodePool Resource Properties

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

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The NodePool resource accepts the following input properties:

Cluster
This property is required.
Changes to this property will trigger replacement.
string
Name of cluster to create node pool in.
NodeType
This property is required.
Changes to this property will trigger replacement.
string
Type of nodes for this specific pool, see docs.
Quantity This property is required. int
Desired number of nodes for specific pool.
Autoscaling Symbiosis.NodePoolAutoscaling
Labels Changes to this property will trigger replacement. Dictionary<string, string>
Node labels to be applied to the nodes
Name Changes to this property will trigger replacement. string
Name of node pool
Taints Changes to this property will trigger replacement. List<Symbiosis.NodePoolTaint>
Node taints to be applied to the nodes
Cluster
This property is required.
Changes to this property will trigger replacement.
string
Name of cluster to create node pool in.
NodeType
This property is required.
Changes to this property will trigger replacement.
string
Type of nodes for this specific pool, see docs.
Quantity This property is required. int
Desired number of nodes for specific pool.
Autoscaling NodePoolAutoscalingArgs
Labels Changes to this property will trigger replacement. map[string]string
Node labels to be applied to the nodes
Name Changes to this property will trigger replacement. string
Name of node pool
Taints Changes to this property will trigger replacement. []NodePoolTaintArgs
Node taints to be applied to the nodes
cluster
This property is required.
Changes to this property will trigger replacement.
String
Name of cluster to create node pool in.
nodeType
This property is required.
Changes to this property will trigger replacement.
String
Type of nodes for this specific pool, see docs.
quantity This property is required. Integer
Desired number of nodes for specific pool.
autoscaling NodePoolAutoscaling
labels Changes to this property will trigger replacement. Map<String,String>
Node labels to be applied to the nodes
name Changes to this property will trigger replacement. String
Name of node pool
taints Changes to this property will trigger replacement. List<NodePoolTaint>
Node taints to be applied to the nodes
cluster
This property is required.
Changes to this property will trigger replacement.
string
Name of cluster to create node pool in.
nodeType
This property is required.
Changes to this property will trigger replacement.
string
Type of nodes for this specific pool, see docs.
quantity This property is required. number
Desired number of nodes for specific pool.
autoscaling NodePoolAutoscaling
labels Changes to this property will trigger replacement. {[key: string]: string}
Node labels to be applied to the nodes
name Changes to this property will trigger replacement. string
Name of node pool
taints Changes to this property will trigger replacement. NodePoolTaint[]
Node taints to be applied to the nodes
cluster
This property is required.
Changes to this property will trigger replacement.
str
Name of cluster to create node pool in.
node_type
This property is required.
Changes to this property will trigger replacement.
str
Type of nodes for this specific pool, see docs.
quantity This property is required. int
Desired number of nodes for specific pool.
autoscaling NodePoolAutoscalingArgs
labels Changes to this property will trigger replacement. Mapping[str, str]
Node labels to be applied to the nodes
name Changes to this property will trigger replacement. str
Name of node pool
taints Changes to this property will trigger replacement. Sequence[NodePoolTaintArgs]
Node taints to be applied to the nodes
cluster
This property is required.
Changes to this property will trigger replacement.
String
Name of cluster to create node pool in.
nodeType
This property is required.
Changes to this property will trigger replacement.
String
Type of nodes for this specific pool, see docs.
quantity This property is required. Number
Desired number of nodes for specific pool.
autoscaling Property Map
labels Changes to this property will trigger replacement. Map<String>
Node labels to be applied to the nodes
name Changes to this property will trigger replacement. String
Name of node pool
taints Changes to this property will trigger replacement. List<Property Map>
Node taints to be applied to the nodes

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing NodePool Resource

Get an existing NodePool 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?: NodePoolState, opts?: CustomResourceOptions): NodePool
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        autoscaling: Optional[NodePoolAutoscalingArgs] = None,
        cluster: Optional[str] = None,
        labels: Optional[Mapping[str, str]] = None,
        name: Optional[str] = None,
        node_type: Optional[str] = None,
        quantity: Optional[int] = None,
        taints: Optional[Sequence[NodePoolTaintArgs]] = None) -> NodePool
func GetNodePool(ctx *Context, name string, id IDInput, state *NodePoolState, opts ...ResourceOption) (*NodePool, error)
public static NodePool Get(string name, Input<string> id, NodePoolState? state, CustomResourceOptions? opts = null)
public static NodePool get(String name, Output<String> id, NodePoolState state, CustomResourceOptions options)
resources:  _:    type: symbiosis:NodePool    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Autoscaling Symbiosis.NodePoolAutoscaling
Cluster Changes to this property will trigger replacement. string
Name of cluster to create node pool in.
Labels Changes to this property will trigger replacement. Dictionary<string, string>
Node labels to be applied to the nodes
Name Changes to this property will trigger replacement. string
Name of node pool
NodeType Changes to this property will trigger replacement. string
Type of nodes for this specific pool, see docs.
Quantity int
Desired number of nodes for specific pool.
Taints Changes to this property will trigger replacement. List<Symbiosis.NodePoolTaint>
Node taints to be applied to the nodes
Autoscaling NodePoolAutoscalingArgs
Cluster Changes to this property will trigger replacement. string
Name of cluster to create node pool in.
Labels Changes to this property will trigger replacement. map[string]string
Node labels to be applied to the nodes
Name Changes to this property will trigger replacement. string
Name of node pool
NodeType Changes to this property will trigger replacement. string
Type of nodes for this specific pool, see docs.
Quantity int
Desired number of nodes for specific pool.
Taints Changes to this property will trigger replacement. []NodePoolTaintArgs
Node taints to be applied to the nodes
autoscaling NodePoolAutoscaling
cluster Changes to this property will trigger replacement. String
Name of cluster to create node pool in.
labels Changes to this property will trigger replacement. Map<String,String>
Node labels to be applied to the nodes
name Changes to this property will trigger replacement. String
Name of node pool
nodeType Changes to this property will trigger replacement. String
Type of nodes for this specific pool, see docs.
quantity Integer
Desired number of nodes for specific pool.
taints Changes to this property will trigger replacement. List<NodePoolTaint>
Node taints to be applied to the nodes
autoscaling NodePoolAutoscaling
cluster Changes to this property will trigger replacement. string
Name of cluster to create node pool in.
labels Changes to this property will trigger replacement. {[key: string]: string}
Node labels to be applied to the nodes
name Changes to this property will trigger replacement. string
Name of node pool
nodeType Changes to this property will trigger replacement. string
Type of nodes for this specific pool, see docs.
quantity number
Desired number of nodes for specific pool.
taints Changes to this property will trigger replacement. NodePoolTaint[]
Node taints to be applied to the nodes
autoscaling NodePoolAutoscalingArgs
cluster Changes to this property will trigger replacement. str
Name of cluster to create node pool in.
labels Changes to this property will trigger replacement. Mapping[str, str]
Node labels to be applied to the nodes
name Changes to this property will trigger replacement. str
Name of node pool
node_type Changes to this property will trigger replacement. str
Type of nodes for this specific pool, see docs.
quantity int
Desired number of nodes for specific pool.
taints Changes to this property will trigger replacement. Sequence[NodePoolTaintArgs]
Node taints to be applied to the nodes
autoscaling Property Map
cluster Changes to this property will trigger replacement. String
Name of cluster to create node pool in.
labels Changes to this property will trigger replacement. Map<String>
Node labels to be applied to the nodes
name Changes to this property will trigger replacement. String
Name of node pool
nodeType Changes to this property will trigger replacement. String
Type of nodes for this specific pool, see docs.
quantity Number
Desired number of nodes for specific pool.
taints Changes to this property will trigger replacement. List<Property Map>
Node taints to be applied to the nodes

Supporting Types

NodePoolAutoscaling
, NodePoolAutoscalingArgs

Enabled This property is required. bool
MaxSize This property is required. int
MinSize This property is required. int
Enabled This property is required. bool
MaxSize This property is required. int
MinSize This property is required. int
enabled This property is required. Boolean
maxSize This property is required. Integer
minSize This property is required. Integer
enabled This property is required. boolean
maxSize This property is required. number
minSize This property is required. number
enabled This property is required. bool
max_size This property is required. int
min_size This property is required. int
enabled This property is required. Boolean
maxSize This property is required. Number
minSize This property is required. Number

NodePoolTaint
, NodePoolTaintArgs

Effect This property is required. string
Taint effect. Can be either NoSchedule, PreferNoSchedule or NoExecute. See: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
Key This property is required. string
Value This property is required. string
Effect This property is required. string
Taint effect. Can be either NoSchedule, PreferNoSchedule or NoExecute. See: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
Key This property is required. string
Value This property is required. string
effect This property is required. String
Taint effect. Can be either NoSchedule, PreferNoSchedule or NoExecute. See: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
key This property is required. String
value This property is required. String
effect This property is required. string
Taint effect. Can be either NoSchedule, PreferNoSchedule or NoExecute. See: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
key This property is required. string
value This property is required. string
effect This property is required. str
Taint effect. Can be either NoSchedule, PreferNoSchedule or NoExecute. See: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
key This property is required. str
value This property is required. str
effect This property is required. String
Taint effect. Can be either NoSchedule, PreferNoSchedule or NoExecute. See: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
key This property is required. String
value This property is required. String

Package Details

Repository
symbiosis symbiosis-cloud/pulumi-symbiosis
License
Apache-2.0
Notes
This Pulumi package is based on the symbiosis Terraform Provider.