1. Packages
  2. Ionoscloud
  3. API Docs
  4. k8s
  5. getNodePool
IonosCloud v0.2.2 published on Monday, May 12, 2025 by ionos-cloud

ionoscloud.k8s.getNodePool

Explore with Pulumi AI

ionoscloud logo
IonosCloud v0.2.2 published on Monday, May 12, 2025 by ionos-cloud

    The k8s Node Pool data source can be used to search for and return existing k8s Node Pools. If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned. When this happens, please refine your search string so that it is specific enough to return only one result.

    Example Usage

    By ID

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@pulumi/ionoscloud";
    
    const example = ionoscloud.k8s.getNodePool({
        id: "k8s_nodepool_id",
        k8sClusterId: "k8s_cluster_id",
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.k8s.get_node_pool(id="k8s_nodepool_id",
        k8s_cluster_id="k8s_cluster_id")
    
    package main
    
    import (
    	"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/k8s"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := k8s.LookupNodePool(ctx, &k8s.LookupNodePoolArgs{
    			Id:           pulumi.StringRef("k8s_nodepool_id"),
    			K8sClusterId: "k8s_cluster_id",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ionoscloud = Pulumi.Ionoscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Ionoscloud.K8s.GetNodePool.Invoke(new()
        {
            Id = "k8s_nodepool_id",
            K8sClusterId = "k8s_cluster_id",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ionoscloud.k8s.K8sFunctions;
    import com.pulumi.ionoscloud.k8s.inputs.GetNodePoolArgs;
    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) {
            final var example = K8sFunctions.getNodePool(GetNodePoolArgs.builder()
                .id("k8s_nodepool_id")
                .k8sClusterId("k8s_cluster_id")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ionoscloud:k8s:getNodePool
          arguments:
            id: k8s_nodepool_id
            k8sClusterId: k8s_cluster_id
    

    By Name

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@pulumi/ionoscloud";
    
    const example = ionoscloud.k8s.getNodePool({
        name: "k8s NodePool Example",
        k8sClusterId: "k8s_cluster_id",
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.k8s.get_node_pool(name="k8s NodePool Example",
        k8s_cluster_id="k8s_cluster_id")
    
    package main
    
    import (
    	"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/k8s"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := k8s.LookupNodePool(ctx, &k8s.LookupNodePoolArgs{
    			Name:         pulumi.StringRef("k8s NodePool Example"),
    			K8sClusterId: "k8s_cluster_id",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ionoscloud = Pulumi.Ionoscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Ionoscloud.K8s.GetNodePool.Invoke(new()
        {
            Name = "k8s NodePool Example",
            K8sClusterId = "k8s_cluster_id",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ionoscloud.k8s.K8sFunctions;
    import com.pulumi.ionoscloud.k8s.inputs.GetNodePoolArgs;
    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) {
            final var example = K8sFunctions.getNodePool(GetNodePoolArgs.builder()
                .name("k8s NodePool Example")
                .k8sClusterId("k8s_cluster_id")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ionoscloud:k8s:getNodePool
          arguments:
            name: k8s NodePool Example
            k8sClusterId: k8s_cluster_id
    

    Using getNodePool

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getNodePool(args: GetNodePoolArgs, opts?: InvokeOptions): Promise<GetNodePoolResult>
    function getNodePoolOutput(args: GetNodePoolOutputArgs, opts?: InvokeOptions): Output<GetNodePoolResult>
    def get_node_pool(id: Optional[str] = None,
                      k8s_cluster_id: Optional[str] = None,
                      name: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetNodePoolResult
    def get_node_pool_output(id: Optional[pulumi.Input[str]] = None,
                      k8s_cluster_id: Optional[pulumi.Input[str]] = None,
                      name: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetNodePoolResult]
    func LookupNodePool(ctx *Context, args *LookupNodePoolArgs, opts ...InvokeOption) (*LookupNodePoolResult, error)
    func LookupNodePoolOutput(ctx *Context, args *LookupNodePoolOutputArgs, opts ...InvokeOption) LookupNodePoolResultOutput

    > Note: This function is named LookupNodePool in the Go SDK.

    public static class GetNodePool 
    {
        public static Task<GetNodePoolResult> InvokeAsync(GetNodePoolArgs args, InvokeOptions? opts = null)
        public static Output<GetNodePoolResult> Invoke(GetNodePoolInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNodePoolResult> getNodePool(GetNodePoolArgs args, InvokeOptions options)
    public static Output<GetNodePoolResult> getNodePool(GetNodePoolArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ionoscloud:k8s/getNodePool:getNodePool
      arguments:
        # arguments dictionary

    The following arguments are supported:

    K8sClusterId string
    K8s Cluster' UUID
    Id string

    ID of the node pool you want to search for.

    k8s_cluster_id and either name or id must be provided. If none, or both of name and id are provided, the datasource will return an error.

    Name string
    Name of an existing node pool that you want to search for.
    K8sClusterId string
    K8s Cluster' UUID
    Id string

    ID of the node pool you want to search for.

    k8s_cluster_id and either name or id must be provided. If none, or both of name and id are provided, the datasource will return an error.

    Name string
    Name of an existing node pool that you want to search for.
    k8sClusterId String
    K8s Cluster' UUID
    id String

    ID of the node pool you want to search for.

    k8s_cluster_id and either name or id must be provided. If none, or both of name and id are provided, the datasource will return an error.

    name String
    Name of an existing node pool that you want to search for.
    k8sClusterId string
    K8s Cluster' UUID
    id string

    ID of the node pool you want to search for.

    k8s_cluster_id and either name or id must be provided. If none, or both of name and id are provided, the datasource will return an error.

    name string
    Name of an existing node pool that you want to search for.
    k8s_cluster_id str
    K8s Cluster' UUID
    id str

    ID of the node pool you want to search for.

    k8s_cluster_id and either name or id must be provided. If none, or both of name and id are provided, the datasource will return an error.

    name str
    Name of an existing node pool that you want to search for.
    k8sClusterId String
    K8s Cluster' UUID
    id String

    ID of the node pool you want to search for.

    k8s_cluster_id and either name or id must be provided. If none, or both of name and id are provided, the datasource will return an error.

    name String
    Name of an existing node pool that you want to search for.

    getNodePool Result

    The following output properties are available:

    Annotations Dictionary<string, string>
    A map of annotations in the form of key > value
    AutoScalings List<Ionoscloud.GetNodePoolAutoScaling>
    The range defining the minimum and maximum number of worker nodes that the managed node group can scale in
    AvailabilityZone string
    The compute availability zone in which the nodes should exist
    AvailableUpgradeVersions List<string>
    A list of kubernetes versions available for upgrade
    CoresCount int
    CPU cores count
    CpuFamily string
    CPU Family
    DatacenterId string
    The UUID of the VDC
    Id string
    The LAN ID of an existing LAN at the related datacenter
    K8sClusterId string
    ID of the cluster this node pool is part of
    K8sVersion string
    The kubernetes version
    Labels Dictionary<string, string>
    A map of labels in the form of key > value
    Lans List<Ionoscloud.GetNodePoolLan>
    A list of Local Area Networks the node pool is a part of
    MaintenanceWindows List<Ionoscloud.GetNodePoolMaintenanceWindow>
    A maintenance window comprise of a day of the week and a time for maintenance to be allowed
    Name string
    name of the node pool
    NodeCount int
    The number of nodes in this node pool
    PublicIps List<string>
    The list of fixed IPs associated with this node pool
    RamSize int
    The amount of RAM in MB
    State string
    one of "AVAILABLE", "INACTIVE", "BUSY", "DEPLOYING", "ACTIVE", "FAILED", "SUSPENDED", "FAILED_SUSPENDED", "UPDATING", "FAILED_UPDATING", "DESTROYING", "FAILED_DESTROYING", "TERMINATED"
    StorageSize int
    The size of the volume in GB. The size should be greater than 10GB.
    StorageType string
    HDD or SDD
    Annotations map[string]string
    A map of annotations in the form of key > value
    AutoScalings []GetNodePoolAutoScaling
    The range defining the minimum and maximum number of worker nodes that the managed node group can scale in
    AvailabilityZone string
    The compute availability zone in which the nodes should exist
    AvailableUpgradeVersions []string
    A list of kubernetes versions available for upgrade
    CoresCount int
    CPU cores count
    CpuFamily string
    CPU Family
    DatacenterId string
    The UUID of the VDC
    Id string
    The LAN ID of an existing LAN at the related datacenter
    K8sClusterId string
    ID of the cluster this node pool is part of
    K8sVersion string
    The kubernetes version
    Labels map[string]string
    A map of labels in the form of key > value
    Lans []GetNodePoolLan
    A list of Local Area Networks the node pool is a part of
    MaintenanceWindows []GetNodePoolMaintenanceWindow
    A maintenance window comprise of a day of the week and a time for maintenance to be allowed
    Name string
    name of the node pool
    NodeCount int
    The number of nodes in this node pool
    PublicIps []string
    The list of fixed IPs associated with this node pool
    RamSize int
    The amount of RAM in MB
    State string
    one of "AVAILABLE", "INACTIVE", "BUSY", "DEPLOYING", "ACTIVE", "FAILED", "SUSPENDED", "FAILED_SUSPENDED", "UPDATING", "FAILED_UPDATING", "DESTROYING", "FAILED_DESTROYING", "TERMINATED"
    StorageSize int
    The size of the volume in GB. The size should be greater than 10GB.
    StorageType string
    HDD or SDD
    annotations Map<String,String>
    A map of annotations in the form of key > value
    autoScalings List<GetNodePoolAutoScaling>
    The range defining the minimum and maximum number of worker nodes that the managed node group can scale in
    availabilityZone String
    The compute availability zone in which the nodes should exist
    availableUpgradeVersions List<String>
    A list of kubernetes versions available for upgrade
    coresCount Integer
    CPU cores count
    cpuFamily String
    CPU Family
    datacenterId String
    The UUID of the VDC
    id String
    The LAN ID of an existing LAN at the related datacenter
    k8sClusterId String
    ID of the cluster this node pool is part of
    k8sVersion String
    The kubernetes version
    labels Map<String,String>
    A map of labels in the form of key > value
    lans List<GetNodePoolLan>
    A list of Local Area Networks the node pool is a part of
    maintenanceWindows List<GetNodePoolMaintenanceWindow>
    A maintenance window comprise of a day of the week and a time for maintenance to be allowed
    name String
    name of the node pool
    nodeCount Integer
    The number of nodes in this node pool
    publicIps List<String>
    The list of fixed IPs associated with this node pool
    ramSize Integer
    The amount of RAM in MB
    state String
    one of "AVAILABLE", "INACTIVE", "BUSY", "DEPLOYING", "ACTIVE", "FAILED", "SUSPENDED", "FAILED_SUSPENDED", "UPDATING", "FAILED_UPDATING", "DESTROYING", "FAILED_DESTROYING", "TERMINATED"
    storageSize Integer
    The size of the volume in GB. The size should be greater than 10GB.
    storageType String
    HDD or SDD
    annotations {[key: string]: string}
    A map of annotations in the form of key > value
    autoScalings GetNodePoolAutoScaling[]
    The range defining the minimum and maximum number of worker nodes that the managed node group can scale in
    availabilityZone string
    The compute availability zone in which the nodes should exist
    availableUpgradeVersions string[]
    A list of kubernetes versions available for upgrade
    coresCount number
    CPU cores count
    cpuFamily string
    CPU Family
    datacenterId string
    The UUID of the VDC
    id string
    The LAN ID of an existing LAN at the related datacenter
    k8sClusterId string
    ID of the cluster this node pool is part of
    k8sVersion string
    The kubernetes version
    labels {[key: string]: string}
    A map of labels in the form of key > value
    lans GetNodePoolLan[]
    A list of Local Area Networks the node pool is a part of
    maintenanceWindows GetNodePoolMaintenanceWindow[]
    A maintenance window comprise of a day of the week and a time for maintenance to be allowed
    name string
    name of the node pool
    nodeCount number
    The number of nodes in this node pool
    publicIps string[]
    The list of fixed IPs associated with this node pool
    ramSize number
    The amount of RAM in MB
    state string
    one of "AVAILABLE", "INACTIVE", "BUSY", "DEPLOYING", "ACTIVE", "FAILED", "SUSPENDED", "FAILED_SUSPENDED", "UPDATING", "FAILED_UPDATING", "DESTROYING", "FAILED_DESTROYING", "TERMINATED"
    storageSize number
    The size of the volume in GB. The size should be greater than 10GB.
    storageType string
    HDD or SDD
    annotations Mapping[str, str]
    A map of annotations in the form of key > value
    auto_scalings Sequence[GetNodePoolAutoScaling]
    The range defining the minimum and maximum number of worker nodes that the managed node group can scale in
    availability_zone str
    The compute availability zone in which the nodes should exist
    available_upgrade_versions Sequence[str]
    A list of kubernetes versions available for upgrade
    cores_count int
    CPU cores count
    cpu_family str
    CPU Family
    datacenter_id str
    The UUID of the VDC
    id str
    The LAN ID of an existing LAN at the related datacenter
    k8s_cluster_id str
    ID of the cluster this node pool is part of
    k8s_version str
    The kubernetes version
    labels Mapping[str, str]
    A map of labels in the form of key > value
    lans Sequence[GetNodePoolLan]
    A list of Local Area Networks the node pool is a part of
    maintenance_windows Sequence[GetNodePoolMaintenanceWindow]
    A maintenance window comprise of a day of the week and a time for maintenance to be allowed
    name str
    name of the node pool
    node_count int
    The number of nodes in this node pool
    public_ips Sequence[str]
    The list of fixed IPs associated with this node pool
    ram_size int
    The amount of RAM in MB
    state str
    one of "AVAILABLE", "INACTIVE", "BUSY", "DEPLOYING", "ACTIVE", "FAILED", "SUSPENDED", "FAILED_SUSPENDED", "UPDATING", "FAILED_UPDATING", "DESTROYING", "FAILED_DESTROYING", "TERMINATED"
    storage_size int
    The size of the volume in GB. The size should be greater than 10GB.
    storage_type str
    HDD or SDD
    annotations Map<String>
    A map of annotations in the form of key > value
    autoScalings List<Property Map>
    The range defining the minimum and maximum number of worker nodes that the managed node group can scale in
    availabilityZone String
    The compute availability zone in which the nodes should exist
    availableUpgradeVersions List<String>
    A list of kubernetes versions available for upgrade
    coresCount Number
    CPU cores count
    cpuFamily String
    CPU Family
    datacenterId String
    The UUID of the VDC
    id String
    The LAN ID of an existing LAN at the related datacenter
    k8sClusterId String
    ID of the cluster this node pool is part of
    k8sVersion String
    The kubernetes version
    labels Map<String>
    A map of labels in the form of key > value
    lans List<Property Map>
    A list of Local Area Networks the node pool is a part of
    maintenanceWindows List<Property Map>
    A maintenance window comprise of a day of the week and a time for maintenance to be allowed
    name String
    name of the node pool
    nodeCount Number
    The number of nodes in this node pool
    publicIps List<String>
    The list of fixed IPs associated with this node pool
    ramSize Number
    The amount of RAM in MB
    state String
    one of "AVAILABLE", "INACTIVE", "BUSY", "DEPLOYING", "ACTIVE", "FAILED", "SUSPENDED", "FAILED_SUSPENDED", "UPDATING", "FAILED_UPDATING", "DESTROYING", "FAILED_DESTROYING", "TERMINATED"
    storageSize Number
    The size of the volume in GB. The size should be greater than 10GB.
    storageType String
    HDD or SDD

    Supporting Types

    GetNodePoolAutoScaling

    MaxNodeCount int
    The maximum number of worker nodes that the node pool can scale to
    MinNodeCount int
    The minimum number of worker nodes the node pool can scale down to
    MaxNodeCount int
    The maximum number of worker nodes that the node pool can scale to
    MinNodeCount int
    The minimum number of worker nodes the node pool can scale down to
    maxNodeCount Integer
    The maximum number of worker nodes that the node pool can scale to
    minNodeCount Integer
    The minimum number of worker nodes the node pool can scale down to
    maxNodeCount number
    The maximum number of worker nodes that the node pool can scale to
    minNodeCount number
    The minimum number of worker nodes the node pool can scale down to
    max_node_count int
    The maximum number of worker nodes that the node pool can scale to
    min_node_count int
    The minimum number of worker nodes the node pool can scale down to
    maxNodeCount Number
    The maximum number of worker nodes that the node pool can scale to
    minNodeCount Number
    The minimum number of worker nodes the node pool can scale down to

    GetNodePoolLan

    Dhcp bool
    Indicates if the Kubernetes Node Pool LAN will reserve an IP using DHCP
    Id int

    ID of the node pool you want to search for.

    k8s_cluster_id and either name or id must be provided. If none, or both of name and id are provided, the datasource will return an error.

    Routes List<Ionoscloud.GetNodePoolLanRoute>
    An array of additional LANs attached to worker nodes
    Dhcp bool
    Indicates if the Kubernetes Node Pool LAN will reserve an IP using DHCP
    Id int

    ID of the node pool you want to search for.

    k8s_cluster_id and either name or id must be provided. If none, or both of name and id are provided, the datasource will return an error.

    Routes []GetNodePoolLanRoute
    An array of additional LANs attached to worker nodes
    dhcp Boolean
    Indicates if the Kubernetes Node Pool LAN will reserve an IP using DHCP
    id Integer

    ID of the node pool you want to search for.

    k8s_cluster_id and either name or id must be provided. If none, or both of name and id are provided, the datasource will return an error.

    routes List<GetNodePoolLanRoute>
    An array of additional LANs attached to worker nodes
    dhcp boolean
    Indicates if the Kubernetes Node Pool LAN will reserve an IP using DHCP
    id number

    ID of the node pool you want to search for.

    k8s_cluster_id and either name or id must be provided. If none, or both of name and id are provided, the datasource will return an error.

    routes GetNodePoolLanRoute[]
    An array of additional LANs attached to worker nodes
    dhcp bool
    Indicates if the Kubernetes Node Pool LAN will reserve an IP using DHCP
    id int

    ID of the node pool you want to search for.

    k8s_cluster_id and either name or id must be provided. If none, or both of name and id are provided, the datasource will return an error.

    routes Sequence[GetNodePoolLanRoute]
    An array of additional LANs attached to worker nodes
    dhcp Boolean
    Indicates if the Kubernetes Node Pool LAN will reserve an IP using DHCP
    id Number

    ID of the node pool you want to search for.

    k8s_cluster_id and either name or id must be provided. If none, or both of name and id are provided, the datasource will return an error.

    routes List<Property Map>
    An array of additional LANs attached to worker nodes

    GetNodePoolLanRoute

    GatewayIp string
    IPv4 or IPv6 Gateway IP for the route
    Network string
    IPv4 or IPv6 CIDR to be routed via the interface
    GatewayIp string
    IPv4 or IPv6 Gateway IP for the route
    Network string
    IPv4 or IPv6 CIDR to be routed via the interface
    gatewayIp String
    IPv4 or IPv6 Gateway IP for the route
    network String
    IPv4 or IPv6 CIDR to be routed via the interface
    gatewayIp string
    IPv4 or IPv6 Gateway IP for the route
    network string
    IPv4 or IPv6 CIDR to be routed via the interface
    gateway_ip str
    IPv4 or IPv6 Gateway IP for the route
    network str
    IPv4 or IPv6 CIDR to be routed via the interface
    gatewayIp String
    IPv4 or IPv6 Gateway IP for the route
    network String
    IPv4 or IPv6 CIDR to be routed via the interface

    GetNodePoolMaintenanceWindow

    DayOfTheWeek string
    Day of the week when maintenance is allowed
    Time string
    A clock time in the day when maintenance is allowed
    DayOfTheWeek string
    Day of the week when maintenance is allowed
    Time string
    A clock time in the day when maintenance is allowed
    dayOfTheWeek String
    Day of the week when maintenance is allowed
    time String
    A clock time in the day when maintenance is allowed
    dayOfTheWeek string
    Day of the week when maintenance is allowed
    time string
    A clock time in the day when maintenance is allowed
    day_of_the_week str
    Day of the week when maintenance is allowed
    time str
    A clock time in the day when maintenance is allowed
    dayOfTheWeek String
    Day of the week when maintenance is allowed
    time String
    A clock time in the day when maintenance is allowed

    Package Details

    Repository
    ionoscloud ionos-cloud/pulumi-ionoscloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ionoscloud Terraform Provider.
    ionoscloud logo
    IonosCloud v0.2.2 published on Monday, May 12, 2025 by ionos-cloud