1. Packages
  2. Azure Classic
  3. API Docs
  4. containerservice
  5. getClusterNodePool

We recommend using Azure Native.

Azure Classic v5.67.0 published on Wednesday, Feb 21, 2024 by Pulumi

azure.containerservice.getClusterNodePool

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.67.0 published on Wednesday, Feb 21, 2024 by Pulumi

    Use this data source to access information about an existing Kubernetes Cluster Node Pool.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Azure.ContainerService.GetClusterNodePool.Invoke(new()
        {
            Name = "existing",
            KubernetesClusterName = "existing-cluster",
            ResourceGroupName = "existing-resource-group",
        });
    
        return new Dictionary<string, object?>
        {
            ["id"] = example.Apply(getClusterNodePoolResult => getClusterNodePoolResult.Id),
        };
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/containerservice"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := containerservice.GetClusterNodePool(ctx, &containerservice.GetClusterNodePoolArgs{
    			Name:                  "existing",
    			KubernetesClusterName: "existing-cluster",
    			ResourceGroupName:     "existing-resource-group",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("id", example.Id)
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.containerservice.ContainerserviceFunctions;
    import com.pulumi.azure.containerservice.inputs.GetClusterNodePoolArgs;
    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 = ContainerserviceFunctions.getClusterNodePool(GetClusterNodePoolArgs.builder()
                .name("existing")
                .kubernetesClusterName("existing-cluster")
                .resourceGroupName("existing-resource-group")
                .build());
    
            ctx.export("id", example.applyValue(getClusterNodePoolResult -> getClusterNodePoolResult.id()));
        }
    }
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.containerservice.get_cluster_node_pool(name="existing",
        kubernetes_cluster_name="existing-cluster",
        resource_group_name="existing-resource-group")
    pulumi.export("id", example.id)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.containerservice.getClusterNodePool({
        name: "existing",
        kubernetesClusterName: "existing-cluster",
        resourceGroupName: "existing-resource-group",
    });
    export const id = example.then(example => example.id);
    
    variables:
      example:
        fn::invoke:
          Function: azure:containerservice:getClusterNodePool
          Arguments:
            name: existing
            kubernetesClusterName: existing-cluster
            resourceGroupName: existing-resource-group
    outputs:
      id: ${example.id}
    

    Using getClusterNodePool

    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 getClusterNodePool(args: GetClusterNodePoolArgs, opts?: InvokeOptions): Promise<GetClusterNodePoolResult>
    function getClusterNodePoolOutput(args: GetClusterNodePoolOutputArgs, opts?: InvokeOptions): Output<GetClusterNodePoolResult>
    def get_cluster_node_pool(kubernetes_cluster_name: Optional[str] = None,
                              name: Optional[str] = None,
                              resource_group_name: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetClusterNodePoolResult
    def get_cluster_node_pool_output(kubernetes_cluster_name: Optional[pulumi.Input[str]] = None,
                              name: Optional[pulumi.Input[str]] = None,
                              resource_group_name: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetClusterNodePoolResult]
    func GetClusterNodePool(ctx *Context, args *GetClusterNodePoolArgs, opts ...InvokeOption) (*GetClusterNodePoolResult, error)
    func GetClusterNodePoolOutput(ctx *Context, args *GetClusterNodePoolOutputArgs, opts ...InvokeOption) GetClusterNodePoolResultOutput

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

    public static class GetClusterNodePool 
    {
        public static Task<GetClusterNodePoolResult> InvokeAsync(GetClusterNodePoolArgs args, InvokeOptions? opts = null)
        public static Output<GetClusterNodePoolResult> Invoke(GetClusterNodePoolInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetClusterNodePoolResult> getClusterNodePool(GetClusterNodePoolArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure:containerservice/getClusterNodePool:getClusterNodePool
      arguments:
        # arguments dictionary

    The following arguments are supported:

    KubernetesClusterName string
    The Name of the Kubernetes Cluster where this Node Pool is located.
    Name string
    The name of this Kubernetes Cluster Node Pool.
    ResourceGroupName string
    The name of the Resource Group where the Kubernetes Cluster exists.
    KubernetesClusterName string
    The Name of the Kubernetes Cluster where this Node Pool is located.
    Name string
    The name of this Kubernetes Cluster Node Pool.
    ResourceGroupName string
    The name of the Resource Group where the Kubernetes Cluster exists.
    kubernetesClusterName String
    The Name of the Kubernetes Cluster where this Node Pool is located.
    name String
    The name of this Kubernetes Cluster Node Pool.
    resourceGroupName String
    The name of the Resource Group where the Kubernetes Cluster exists.
    kubernetesClusterName string
    The Name of the Kubernetes Cluster where this Node Pool is located.
    name string
    The name of this Kubernetes Cluster Node Pool.
    resourceGroupName string
    The name of the Resource Group where the Kubernetes Cluster exists.
    kubernetes_cluster_name str
    The Name of the Kubernetes Cluster where this Node Pool is located.
    name str
    The name of this Kubernetes Cluster Node Pool.
    resource_group_name str
    The name of the Resource Group where the Kubernetes Cluster exists.
    kubernetesClusterName String
    The Name of the Kubernetes Cluster where this Node Pool is located.
    name String
    The name of this Kubernetes Cluster Node Pool.
    resourceGroupName String
    The name of the Resource Group where the Kubernetes Cluster exists.

    getClusterNodePool Result

    The following output properties are available:

    EnableAutoScaling bool
    Does this Node Pool have Auto-Scaling enabled?
    EnableNodePublicIp bool
    Do nodes in this Node Pool have a Public IP Address?
    EvictionPolicy string
    The eviction policy used for Virtual Machines in the Virtual Machine Scale Set, when priority is set to Spot.
    Id string
    The provider-assigned unique ID for this managed resource.
    KubernetesClusterName string
    MaxCount int
    The maximum number of Nodes allowed when auto-scaling is enabled.
    MaxPods int
    The maximum number of Pods allowed on each Node in this Node Pool.
    MinCount int
    The minimum number of Nodes allowed when auto-scaling is enabled.
    Mode string
    The Mode for this Node Pool, specifying how these Nodes should be used (for either System or User resources).
    Name string
    NodeCount int
    The current number of Nodes in the Node Pool.
    NodeLabels Dictionary<string, string>
    A map of Kubernetes Labels applied to each Node in this Node Pool.
    NodePublicIpPrefixId string
    Resource ID for the Public IP Addresses Prefix for the nodes in this Agent Pool.
    NodeTaints List<string>
    A map of Kubernetes Taints applied to each Node in this Node Pool.
    OrchestratorVersion string
    The version of Kubernetes configured on each Node in this Node Pool.
    OsDiskSizeGb int
    The size of the OS Disk on each Node in this Node Pool.
    OsDiskType string
    The type of the OS Disk on each Node in this Node Pool.
    OsType string
    The operating system used on each Node in this Node Pool.
    Priority string
    The priority of the Virtual Machines in the Virtual Machine Scale Set backing this Node Pool.
    ProximityPlacementGroupId string
    The ID of the Proximity Placement Group where the Virtual Machine Scale Set backing this Node Pool will be placed.
    ResourceGroupName string
    SpotMaxPrice double
    The maximum price being paid for Virtual Machines in this Scale Set. -1 means the current on-demand price for a Virtual Machine.
    Tags Dictionary<string, string>
    A mapping of tags assigned to the Kubernetes Cluster Node Pool.
    UpgradeSettings List<GetClusterNodePoolUpgradeSetting>
    A upgrade_settings block as documented below.
    VmSize string
    The size of the Virtual Machines used in the Virtual Machine Scale Set backing this Node Pool.
    VnetSubnetId string
    The ID of the Subnet in which this Node Pool exists.
    Zones List<string>
    A list of the Availability Zones where the Nodes in this Node Pool exist.
    EnableAutoScaling bool
    Does this Node Pool have Auto-Scaling enabled?
    EnableNodePublicIp bool
    Do nodes in this Node Pool have a Public IP Address?
    EvictionPolicy string
    The eviction policy used for Virtual Machines in the Virtual Machine Scale Set, when priority is set to Spot.
    Id string
    The provider-assigned unique ID for this managed resource.
    KubernetesClusterName string
    MaxCount int
    The maximum number of Nodes allowed when auto-scaling is enabled.
    MaxPods int
    The maximum number of Pods allowed on each Node in this Node Pool.
    MinCount int
    The minimum number of Nodes allowed when auto-scaling is enabled.
    Mode string
    The Mode for this Node Pool, specifying how these Nodes should be used (for either System or User resources).
    Name string
    NodeCount int
    The current number of Nodes in the Node Pool.
    NodeLabels map[string]string
    A map of Kubernetes Labels applied to each Node in this Node Pool.
    NodePublicIpPrefixId string
    Resource ID for the Public IP Addresses Prefix for the nodes in this Agent Pool.
    NodeTaints []string
    A map of Kubernetes Taints applied to each Node in this Node Pool.
    OrchestratorVersion string
    The version of Kubernetes configured on each Node in this Node Pool.
    OsDiskSizeGb int
    The size of the OS Disk on each Node in this Node Pool.
    OsDiskType string
    The type of the OS Disk on each Node in this Node Pool.
    OsType string
    The operating system used on each Node in this Node Pool.
    Priority string
    The priority of the Virtual Machines in the Virtual Machine Scale Set backing this Node Pool.
    ProximityPlacementGroupId string
    The ID of the Proximity Placement Group where the Virtual Machine Scale Set backing this Node Pool will be placed.
    ResourceGroupName string
    SpotMaxPrice float64
    The maximum price being paid for Virtual Machines in this Scale Set. -1 means the current on-demand price for a Virtual Machine.
    Tags map[string]string
    A mapping of tags assigned to the Kubernetes Cluster Node Pool.
    UpgradeSettings []GetClusterNodePoolUpgradeSetting
    A upgrade_settings block as documented below.
    VmSize string
    The size of the Virtual Machines used in the Virtual Machine Scale Set backing this Node Pool.
    VnetSubnetId string
    The ID of the Subnet in which this Node Pool exists.
    Zones []string
    A list of the Availability Zones where the Nodes in this Node Pool exist.
    enableAutoScaling Boolean
    Does this Node Pool have Auto-Scaling enabled?
    enableNodePublicIp Boolean
    Do nodes in this Node Pool have a Public IP Address?
    evictionPolicy String
    The eviction policy used for Virtual Machines in the Virtual Machine Scale Set, when priority is set to Spot.
    id String
    The provider-assigned unique ID for this managed resource.
    kubernetesClusterName String
    maxCount Integer
    The maximum number of Nodes allowed when auto-scaling is enabled.
    maxPods Integer
    The maximum number of Pods allowed on each Node in this Node Pool.
    minCount Integer
    The minimum number of Nodes allowed when auto-scaling is enabled.
    mode String
    The Mode for this Node Pool, specifying how these Nodes should be used (for either System or User resources).
    name String
    nodeCount Integer
    The current number of Nodes in the Node Pool.
    nodeLabels Map<String,String>
    A map of Kubernetes Labels applied to each Node in this Node Pool.
    nodePublicIpPrefixId String
    Resource ID for the Public IP Addresses Prefix for the nodes in this Agent Pool.
    nodeTaints List<String>
    A map of Kubernetes Taints applied to each Node in this Node Pool.
    orchestratorVersion String
    The version of Kubernetes configured on each Node in this Node Pool.
    osDiskSizeGb Integer
    The size of the OS Disk on each Node in this Node Pool.
    osDiskType String
    The type of the OS Disk on each Node in this Node Pool.
    osType String
    The operating system used on each Node in this Node Pool.
    priority String
    The priority of the Virtual Machines in the Virtual Machine Scale Set backing this Node Pool.
    proximityPlacementGroupId String
    The ID of the Proximity Placement Group where the Virtual Machine Scale Set backing this Node Pool will be placed.
    resourceGroupName String
    spotMaxPrice Double
    The maximum price being paid for Virtual Machines in this Scale Set. -1 means the current on-demand price for a Virtual Machine.
    tags Map<String,String>
    A mapping of tags assigned to the Kubernetes Cluster Node Pool.
    upgradeSettings List<GetClusterNodePoolUpgradeSetting>
    A upgrade_settings block as documented below.
    vmSize String
    The size of the Virtual Machines used in the Virtual Machine Scale Set backing this Node Pool.
    vnetSubnetId String
    The ID of the Subnet in which this Node Pool exists.
    zones List<String>
    A list of the Availability Zones where the Nodes in this Node Pool exist.
    enableAutoScaling boolean
    Does this Node Pool have Auto-Scaling enabled?
    enableNodePublicIp boolean
    Do nodes in this Node Pool have a Public IP Address?
    evictionPolicy string
    The eviction policy used for Virtual Machines in the Virtual Machine Scale Set, when priority is set to Spot.
    id string
    The provider-assigned unique ID for this managed resource.
    kubernetesClusterName string
    maxCount number
    The maximum number of Nodes allowed when auto-scaling is enabled.
    maxPods number
    The maximum number of Pods allowed on each Node in this Node Pool.
    minCount number
    The minimum number of Nodes allowed when auto-scaling is enabled.
    mode string
    The Mode for this Node Pool, specifying how these Nodes should be used (for either System or User resources).
    name string
    nodeCount number
    The current number of Nodes in the Node Pool.
    nodeLabels {[key: string]: string}
    A map of Kubernetes Labels applied to each Node in this Node Pool.
    nodePublicIpPrefixId string
    Resource ID for the Public IP Addresses Prefix for the nodes in this Agent Pool.
    nodeTaints string[]
    A map of Kubernetes Taints applied to each Node in this Node Pool.
    orchestratorVersion string
    The version of Kubernetes configured on each Node in this Node Pool.
    osDiskSizeGb number
    The size of the OS Disk on each Node in this Node Pool.
    osDiskType string
    The type of the OS Disk on each Node in this Node Pool.
    osType string
    The operating system used on each Node in this Node Pool.
    priority string
    The priority of the Virtual Machines in the Virtual Machine Scale Set backing this Node Pool.
    proximityPlacementGroupId string
    The ID of the Proximity Placement Group where the Virtual Machine Scale Set backing this Node Pool will be placed.
    resourceGroupName string
    spotMaxPrice number
    The maximum price being paid for Virtual Machines in this Scale Set. -1 means the current on-demand price for a Virtual Machine.
    tags {[key: string]: string}
    A mapping of tags assigned to the Kubernetes Cluster Node Pool.
    upgradeSettings GetClusterNodePoolUpgradeSetting[]
    A upgrade_settings block as documented below.
    vmSize string
    The size of the Virtual Machines used in the Virtual Machine Scale Set backing this Node Pool.
    vnetSubnetId string
    The ID of the Subnet in which this Node Pool exists.
    zones string[]
    A list of the Availability Zones where the Nodes in this Node Pool exist.
    enable_auto_scaling bool
    Does this Node Pool have Auto-Scaling enabled?
    enable_node_public_ip bool
    Do nodes in this Node Pool have a Public IP Address?
    eviction_policy str
    The eviction policy used for Virtual Machines in the Virtual Machine Scale Set, when priority is set to Spot.
    id str
    The provider-assigned unique ID for this managed resource.
    kubernetes_cluster_name str
    max_count int
    The maximum number of Nodes allowed when auto-scaling is enabled.
    max_pods int
    The maximum number of Pods allowed on each Node in this Node Pool.
    min_count int
    The minimum number of Nodes allowed when auto-scaling is enabled.
    mode str
    The Mode for this Node Pool, specifying how these Nodes should be used (for either System or User resources).
    name str
    node_count int
    The current number of Nodes in the Node Pool.
    node_labels Mapping[str, str]
    A map of Kubernetes Labels applied to each Node in this Node Pool.
    node_public_ip_prefix_id str
    Resource ID for the Public IP Addresses Prefix for the nodes in this Agent Pool.
    node_taints Sequence[str]
    A map of Kubernetes Taints applied to each Node in this Node Pool.
    orchestrator_version str
    The version of Kubernetes configured on each Node in this Node Pool.
    os_disk_size_gb int
    The size of the OS Disk on each Node in this Node Pool.
    os_disk_type str
    The type of the OS Disk on each Node in this Node Pool.
    os_type str
    The operating system used on each Node in this Node Pool.
    priority str
    The priority of the Virtual Machines in the Virtual Machine Scale Set backing this Node Pool.
    proximity_placement_group_id str
    The ID of the Proximity Placement Group where the Virtual Machine Scale Set backing this Node Pool will be placed.
    resource_group_name str
    spot_max_price float
    The maximum price being paid for Virtual Machines in this Scale Set. -1 means the current on-demand price for a Virtual Machine.
    tags Mapping[str, str]
    A mapping of tags assigned to the Kubernetes Cluster Node Pool.
    upgrade_settings Sequence[GetClusterNodePoolUpgradeSetting]
    A upgrade_settings block as documented below.
    vm_size str
    The size of the Virtual Machines used in the Virtual Machine Scale Set backing this Node Pool.
    vnet_subnet_id str
    The ID of the Subnet in which this Node Pool exists.
    zones Sequence[str]
    A list of the Availability Zones where the Nodes in this Node Pool exist.
    enableAutoScaling Boolean
    Does this Node Pool have Auto-Scaling enabled?
    enableNodePublicIp Boolean
    Do nodes in this Node Pool have a Public IP Address?
    evictionPolicy String
    The eviction policy used for Virtual Machines in the Virtual Machine Scale Set, when priority is set to Spot.
    id String
    The provider-assigned unique ID for this managed resource.
    kubernetesClusterName String
    maxCount Number
    The maximum number of Nodes allowed when auto-scaling is enabled.
    maxPods Number
    The maximum number of Pods allowed on each Node in this Node Pool.
    minCount Number
    The minimum number of Nodes allowed when auto-scaling is enabled.
    mode String
    The Mode for this Node Pool, specifying how these Nodes should be used (for either System or User resources).
    name String
    nodeCount Number
    The current number of Nodes in the Node Pool.
    nodeLabels Map<String>
    A map of Kubernetes Labels applied to each Node in this Node Pool.
    nodePublicIpPrefixId String
    Resource ID for the Public IP Addresses Prefix for the nodes in this Agent Pool.
    nodeTaints List<String>
    A map of Kubernetes Taints applied to each Node in this Node Pool.
    orchestratorVersion String
    The version of Kubernetes configured on each Node in this Node Pool.
    osDiskSizeGb Number
    The size of the OS Disk on each Node in this Node Pool.
    osDiskType String
    The type of the OS Disk on each Node in this Node Pool.
    osType String
    The operating system used on each Node in this Node Pool.
    priority String
    The priority of the Virtual Machines in the Virtual Machine Scale Set backing this Node Pool.
    proximityPlacementGroupId String
    The ID of the Proximity Placement Group where the Virtual Machine Scale Set backing this Node Pool will be placed.
    resourceGroupName String
    spotMaxPrice Number
    The maximum price being paid for Virtual Machines in this Scale Set. -1 means the current on-demand price for a Virtual Machine.
    tags Map<String>
    A mapping of tags assigned to the Kubernetes Cluster Node Pool.
    upgradeSettings List<Property Map>
    A upgrade_settings block as documented below.
    vmSize String
    The size of the Virtual Machines used in the Virtual Machine Scale Set backing this Node Pool.
    vnetSubnetId String
    The ID of the Subnet in which this Node Pool exists.
    zones List<String>
    A list of the Availability Zones where the Nodes in this Node Pool exist.

    Supporting Types

    GetClusterNodePoolUpgradeSetting

    MaxSurge string
    The maximum number or percentage of nodes which will be added to the Node Pool size during an upgrade.
    MaxSurge string
    The maximum number or percentage of nodes which will be added to the Node Pool size during an upgrade.
    maxSurge String
    The maximum number or percentage of nodes which will be added to the Node Pool size during an upgrade.
    maxSurge string
    The maximum number or percentage of nodes which will be added to the Node Pool size during an upgrade.
    max_surge str
    The maximum number or percentage of nodes which will be added to the Node Pool size during an upgrade.
    maxSurge String
    The maximum number or percentage of nodes which will be added to the Node Pool size during an upgrade.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.67.0 published on Wednesday, Feb 21, 2024 by Pulumi