We recommend using Azure Native.
Azure v6.21.0 published on Friday, Mar 7, 2025 by Pulumi
azure.containerservice.getClusterNodePool
Explore with Pulumi AI
Use this data source to access information about an existing Kubernetes Cluster Node Pool.
Example Usage
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);
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)
package main
import (
	"github.com/pulumi/pulumi-azure/sdk/v6/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
	})
}
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 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()));
    }
}
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)
public static Output<GetClusterNodePoolResult> getClusterNodePool(GetClusterNodePoolArgs args, InvokeOptions options)
fn::invoke:
  function: azure:containerservice/getClusterNodePool:getClusterNodePool
  arguments:
    # arguments dictionaryThe following arguments are supported:
- KubernetesCluster stringName 
- The Name of the Kubernetes Cluster where this Node Pool is located.
- Name string
- The name of this Kubernetes Cluster Node Pool.
- ResourceGroup stringName 
- The name of the Resource Group where the Kubernetes Cluster exists.
- KubernetesCluster stringName 
- The Name of the Kubernetes Cluster where this Node Pool is located.
- Name string
- The name of this Kubernetes Cluster Node Pool.
- ResourceGroup stringName 
- The name of the Resource Group where the Kubernetes Cluster exists.
- kubernetesCluster StringName 
- The Name of the Kubernetes Cluster where this Node Pool is located.
- name String
- The name of this Kubernetes Cluster Node Pool.
- resourceGroup StringName 
- The name of the Resource Group where the Kubernetes Cluster exists.
- kubernetesCluster stringName 
- The Name of the Kubernetes Cluster where this Node Pool is located.
- name string
- The name of this Kubernetes Cluster Node Pool.
- resourceGroup stringName 
- The name of the Resource Group where the Kubernetes Cluster exists.
- kubernetes_cluster_ strname 
- The Name of the Kubernetes Cluster where this Node Pool is located.
- name str
- The name of this Kubernetes Cluster Node Pool.
- resource_group_ strname 
- The name of the Resource Group where the Kubernetes Cluster exists.
- kubernetesCluster StringName 
- The Name of the Kubernetes Cluster where this Node Pool is located.
- name String
- The name of this Kubernetes Cluster Node Pool.
- resourceGroup StringName 
- The name of the Resource Group where the Kubernetes Cluster exists.
getClusterNodePool Result
The following output properties are available:
- AutoScaling boolEnabled 
- Does this Node Pool have Auto-Scaling enabled?
- EvictionPolicy string
- The eviction policy used for Virtual Machines in the Virtual Machine Scale Set, when priorityis set toSpot.
- Id string
- The provider-assigned unique ID for this managed resource.
- KubernetesCluster stringName 
- 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.
- NodePublic boolIp Enabled 
- Do nodes in this Node Pool have a Public IP Address?
- NodePublic stringIp Prefix Id 
- 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.
- OsDisk intSize Gb 
- The size of the OS Disk on each Node in this Node Pool.
- OsDisk stringType 
- 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.
- ProximityPlacement stringGroup Id 
- The ID of the Proximity Placement Group where the Virtual Machine Scale Set backing this Node Pool will be placed.
- ResourceGroup stringName 
- SpotMax doublePrice 
- The maximum price being paid for Virtual Machines in this Scale Set. -1means the current on-demand price for a Virtual Machine.
- Dictionary<string, string>
- A mapping of tags assigned to the Kubernetes Cluster Node Pool.
- UpgradeSettings List<GetCluster Node Pool Upgrade Setting> 
- A upgrade_settingsblock as documented below.
- VmSize string
- The size of the Virtual Machines used in the Virtual Machine Scale Set backing this Node Pool.
- VnetSubnet stringId 
- 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.
- AutoScaling boolEnabled 
- Does this Node Pool have Auto-Scaling enabled?
- EvictionPolicy string
- The eviction policy used for Virtual Machines in the Virtual Machine Scale Set, when priorityis set toSpot.
- Id string
- The provider-assigned unique ID for this managed resource.
- KubernetesCluster stringName 
- 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.
- NodePublic boolIp Enabled 
- Do nodes in this Node Pool have a Public IP Address?
- NodePublic stringIp Prefix Id 
- 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.
- OsDisk intSize Gb 
- The size of the OS Disk on each Node in this Node Pool.
- OsDisk stringType 
- 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.
- ProximityPlacement stringGroup Id 
- The ID of the Proximity Placement Group where the Virtual Machine Scale Set backing this Node Pool will be placed.
- ResourceGroup stringName 
- SpotMax float64Price 
- The maximum price being paid for Virtual Machines in this Scale Set. -1means the current on-demand price for a Virtual Machine.
- map[string]string
- A mapping of tags assigned to the Kubernetes Cluster Node Pool.
- UpgradeSettings []GetCluster Node Pool Upgrade Setting 
- A upgrade_settingsblock as documented below.
- VmSize string
- The size of the Virtual Machines used in the Virtual Machine Scale Set backing this Node Pool.
- VnetSubnet stringId 
- 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.
- autoScaling BooleanEnabled 
- Does this Node Pool have Auto-Scaling enabled?
- evictionPolicy String
- The eviction policy used for Virtual Machines in the Virtual Machine Scale Set, when priorityis set toSpot.
- id String
- The provider-assigned unique ID for this managed resource.
- kubernetesCluster StringName 
- 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.
- nodePublic BooleanIp Enabled 
- Do nodes in this Node Pool have a Public IP Address?
- nodePublic StringIp Prefix Id 
- 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.
- osDisk IntegerSize Gb 
- The size of the OS Disk on each Node in this Node Pool.
- osDisk StringType 
- 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.
- proximityPlacement StringGroup Id 
- The ID of the Proximity Placement Group where the Virtual Machine Scale Set backing this Node Pool will be placed.
- resourceGroup StringName 
- spotMax DoublePrice 
- The maximum price being paid for Virtual Machines in this Scale Set. -1means the current on-demand price for a Virtual Machine.
- Map<String,String>
- A mapping of tags assigned to the Kubernetes Cluster Node Pool.
- upgradeSettings List<GetCluster Node Pool Upgrade Setting> 
- A upgrade_settingsblock as documented below.
- vmSize String
- The size of the Virtual Machines used in the Virtual Machine Scale Set backing this Node Pool.
- vnetSubnet StringId 
- 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.
- autoScaling booleanEnabled 
- Does this Node Pool have Auto-Scaling enabled?
- evictionPolicy string
- The eviction policy used for Virtual Machines in the Virtual Machine Scale Set, when priorityis set toSpot.
- id string
- The provider-assigned unique ID for this managed resource.
- kubernetesCluster stringName 
- 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.
- nodePublic booleanIp Enabled 
- Do nodes in this Node Pool have a Public IP Address?
- nodePublic stringIp Prefix Id 
- 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.
- osDisk numberSize Gb 
- The size of the OS Disk on each Node in this Node Pool.
- osDisk stringType 
- 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.
- proximityPlacement stringGroup Id 
- The ID of the Proximity Placement Group where the Virtual Machine Scale Set backing this Node Pool will be placed.
- resourceGroup stringName 
- spotMax numberPrice 
- The maximum price being paid for Virtual Machines in this Scale Set. -1means the current on-demand price for a Virtual Machine.
- {[key: string]: string}
- A mapping of tags assigned to the Kubernetes Cluster Node Pool.
- upgradeSettings GetCluster Node Pool Upgrade Setting[] 
- A upgrade_settingsblock as documented below.
- vmSize string
- The size of the Virtual Machines used in the Virtual Machine Scale Set backing this Node Pool.
- vnetSubnet stringId 
- 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.
- auto_scaling_ boolenabled 
- Does this Node Pool have Auto-Scaling enabled?
- eviction_policy str
- The eviction policy used for Virtual Machines in the Virtual Machine Scale Set, when priorityis set toSpot.
- id str
- The provider-assigned unique ID for this managed resource.
- kubernetes_cluster_ strname 
- 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_ boolip_ enabled 
- Do nodes in this Node Pool have a Public IP Address?
- node_public_ strip_ prefix_ id 
- 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_ intsize_ gb 
- The size of the OS Disk on each Node in this Node Pool.
- os_disk_ strtype 
- 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_ strgroup_ id 
- The ID of the Proximity Placement Group where the Virtual Machine Scale Set backing this Node Pool will be placed.
- resource_group_ strname 
- spot_max_ floatprice 
- The maximum price being paid for Virtual Machines in this Scale Set. -1means the current on-demand price for a Virtual Machine.
- Mapping[str, str]
- A mapping of tags assigned to the Kubernetes Cluster Node Pool.
- upgrade_settings Sequence[GetCluster Node Pool Upgrade Setting] 
- A upgrade_settingsblock 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_ strid 
- 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.
- autoScaling BooleanEnabled 
- Does this Node Pool have Auto-Scaling enabled?
- evictionPolicy String
- The eviction policy used for Virtual Machines in the Virtual Machine Scale Set, when priorityis set toSpot.
- id String
- The provider-assigned unique ID for this managed resource.
- kubernetesCluster StringName 
- 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.
- nodePublic BooleanIp Enabled 
- Do nodes in this Node Pool have a Public IP Address?
- nodePublic StringIp Prefix Id 
- 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.
- osDisk NumberSize Gb 
- The size of the OS Disk on each Node in this Node Pool.
- osDisk StringType 
- 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.
- proximityPlacement StringGroup Id 
- The ID of the Proximity Placement Group where the Virtual Machine Scale Set backing this Node Pool will be placed.
- resourceGroup StringName 
- spotMax NumberPrice 
- The maximum price being paid for Virtual Machines in this Scale Set. -1means the current on-demand price for a Virtual Machine.
- Map<String>
- A mapping of tags assigned to the Kubernetes Cluster Node Pool.
- upgradeSettings List<Property Map>
- A upgrade_settingsblock as documented below.
- vmSize String
- The size of the Virtual Machines used in the Virtual Machine Scale Set backing this Node Pool.
- vnetSubnet StringId 
- 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     
- DrainTimeout intIn Minutes 
- The amount of time in minutes to wait on eviction of pods and graceful termination per node. This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, the upgrade fails.
- MaxSurge string
- The maximum number or percentage of nodes which will be added to the Node Pool size during an upgrade.
- NodeSoak intDuration In Minutes 
- The amount of time in minutes to wait after draining a node and before reimaging it and moving on to next node.
- DrainTimeout intIn Minutes 
- The amount of time in minutes to wait on eviction of pods and graceful termination per node. This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, the upgrade fails.
- MaxSurge string
- The maximum number or percentage of nodes which will be added to the Node Pool size during an upgrade.
- NodeSoak intDuration In Minutes 
- The amount of time in minutes to wait after draining a node and before reimaging it and moving on to next node.
- drainTimeout IntegerIn Minutes 
- The amount of time in minutes to wait on eviction of pods and graceful termination per node. This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, the upgrade fails.
- maxSurge String
- The maximum number or percentage of nodes which will be added to the Node Pool size during an upgrade.
- nodeSoak IntegerDuration In Minutes 
- The amount of time in minutes to wait after draining a node and before reimaging it and moving on to next node.
- drainTimeout numberIn Minutes 
- The amount of time in minutes to wait on eviction of pods and graceful termination per node. This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, the upgrade fails.
- maxSurge string
- The maximum number or percentage of nodes which will be added to the Node Pool size during an upgrade.
- nodeSoak numberDuration In Minutes 
- The amount of time in minutes to wait after draining a node and before reimaging it and moving on to next node.
- drain_timeout_ intin_ minutes 
- The amount of time in minutes to wait on eviction of pods and graceful termination per node. This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, the upgrade fails.
- max_surge str
- The maximum number or percentage of nodes which will be added to the Node Pool size during an upgrade.
- node_soak_ intduration_ in_ minutes 
- The amount of time in minutes to wait after draining a node and before reimaging it and moving on to next node.
- drainTimeout NumberIn Minutes 
- The amount of time in minutes to wait on eviction of pods and graceful termination per node. This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, the upgrade fails.
- maxSurge String
- The maximum number or percentage of nodes which will be added to the Node Pool size during an upgrade.
- nodeSoak NumberDuration In Minutes 
- The amount of time in minutes to wait after draining a node and before reimaging it and moving on to next node.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azurermTerraform Provider.