Kubernetes Cluster Args
Manages a Managed Kubernetes Cluster (also known as AKS / Azure Kubernetes Service)
Example Usage
This example provisions a basic Managed Kubernetes Cluster.
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.KubernetesClusterIdentityArgs;
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())
.identity(KubernetesClusterIdentityArgs.builder()
.type("SystemAssigned")
.build())
.tags(Map.of("Environment", "Production"))
.build());
ctx.export("clientCertificate", exampleKubernetesCluster.kubeConfigs().applyValue(kubeConfigs -> kubeConfigs[0].clientCertificate()));
ctx.export("kubeConfig", exampleKubernetesCluster.kubeConfigRaw());
}
}
Import
Managed Kubernetes Clusters can be imported using the resource id
, e.g.
$ pulumi import azure:containerservice/kubernetesCluster:KubernetesCluster cluster1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ContainerService/managedClusters/cluster1
Constructors
Functions
Properties
A aci_connector_linux
block as defined below. For more details, please visit Create and configure an AKS cluster to use virtual nodes.
The upgrade channel for this Kubernetes Cluster. Possible values are patch
, rapid
, node-image
and stable
. Omitting this field sets this value to none
. !>Note: Cluster Auto-Upgrade will update the Kubernetes Cluster (and its Node Pools) to the latest GA version of Kubernetes automatically - please see the Azure documentation for more information.
Should the Azure Policy Add-On be enabled? For more details please visit Understand Azure Policy for Azure Kubernetes Service
A confidential_computing
block as defined below. For more details please the documentation
The ID of the Disk Encryption Set which should be used for the Nodes and Volumes. More information can be found in the documentation. Changing this forces a new resource to be created.
An identity
block as defined below. One of either identity
or service_principal
must be specified. !>Note: A migration scenario from service_principal
to identity
is supported. When upgrading service_principal
to identity
, your cluster's control plane and addon pods will switch to use managed identity, but the kubelets will keep using your configured service_principal
until you upgrade your Node Pool.
A key_management_service
block as defined below. For more details, please visit Key Management Service (KMS) etcd encryption to an AKS cluster.
A key_vault_secrets_provider
block as defined below. For more details, please visit Azure Keyvault Secrets Provider for AKS.
Version of Kubernetes specified when creating the AKS managed cluster. 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.
If true
local accounts will be disabled. See the documentation for more information.
Is Open Service Mesh enabled? For more details, please visit Open Service Mesh for AKS.
Either the ID of Private DNS Zone which should be delegated to this Cluster, System
to have AKS manage this or None
. In case of None
you will need to bring your own DNS server and set up resolving, otherwise, the cluster will have issues after provisioning. Changing this forces a new resource to be created.
Whether public network access is allowed for this Kubernetes Cluster. Defaults to true
. !>Note: public_network_access_enabled
is currently not functional and is not passed to the Azure API. For further information please see this issue. For controlling the public and private exposure of a cluster please see the properties private_cluster_enabled
and api_server_access_profile
.
A service_principal
block as documented below. One of either identity
or service_principal
must be specified. !>Note: A migration scenario from service_principal
to identity
is supported. When upgrading service_principal
to identity
, your cluster's control plane and addon pods will switch to use managed identity, but the kubelets will keep using your configured service_principal
until you upgrade your Node Pool.