Kubernetes Cluster Node Pool Args
Manages a Node Pool within a Kubernetes Cluster
NOTE: Multiple Node Pools are only supported when the Kubernetes Cluster is using Virtual Machine Scale Sets.
Example Usage
This example provisions a basic Kubernetes Node Pool.
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.containerservice.KubernetesCluster;
import com.pulumi.azure.containerservice.KubernetesClusterArgs;
import com.pulumi.azure.containerservice.inputs.KubernetesClusterDefaultNodePoolArgs;
import com.pulumi.azure.containerservice.inputs.KubernetesClusterServicePrincipalArgs;
import com.pulumi.azure.containerservice.KubernetesClusterNodePool;
import com.pulumi.azure.containerservice.KubernetesClusterNodePoolArgs;
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleKubernetesCluster = new KubernetesCluster("exampleKubernetesCluster", KubernetesClusterArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.dnsPrefix("exampleaks1")
.defaultNodePool(KubernetesClusterDefaultNodePoolArgs.builder()
.name("default")
.nodeCount(1)
.vmSize("Standard_D2_v2")
.build())
.servicePrincipal(KubernetesClusterServicePrincipalArgs.builder()
.clientId("00000000-0000-0000-0000-000000000000")
.clientSecret("00000000000000000000000000000000")
.build())
.build());
var exampleKubernetesClusterNodePool = new KubernetesClusterNodePool("exampleKubernetesClusterNodePool", KubernetesClusterNodePoolArgs.builder()
.kubernetesClusterId(exampleKubernetesCluster.id())
.vmSize("Standard_DS2_v2")
.nodeCount(1)
.tags(Map.of("Environment", "Production"))
.build());
}
}
Import
Kubernetes Cluster Node Pools can be imported using the resource id
, e.g.
$ pulumi import azure:containerservice/kubernetesClusterNodePool:KubernetesClusterNodePool pool1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool1
Constructors
Functions
Properties
A base64-encoded string which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux nodes. It cannot be specified for Windows nodes and must be a static string (i.e. will be printed raw and not executed as a script). Changing this forces a new resource to be created.
Version of Kubernetes used for the Agents. If not specified, the latest recommended version will be used at provisioning time (but won't auto-upgrade). AKS does not require an exact patch version to be specified, minor version aliases such as 1.22
are also supported. - The minor version's latest GA patch is automatically chosen in that case. More details can be found in the documentation.
Specifies the OS SKU used by the agent pool. Possible values include: AzureLinux
, Ubuntu
, Windows2019
, Windows2022
. If not specified, the default is Ubuntu
if OSType=Linux or Windows2019
if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022
after Windows2019 is deprecated. Changing this forces a new resource to be created.
Used to specify whether the UltraSSD is enabled in the Node Pool. Defaults to false
. See the documentation for more information. Changing this forces a new resource to be created.