KubernetesClusterArgs

data class KubernetesClusterArgs(val aciConnectorLinux: Output<KubernetesClusterAciConnectorLinuxArgs>? = null, val apiServerAccessProfile: Output<KubernetesClusterApiServerAccessProfileArgs>? = null, val apiServerAuthorizedIpRanges: Output<List<String>>? = null, val autoScalerProfile: Output<KubernetesClusterAutoScalerProfileArgs>? = null, val automaticChannelUpgrade: Output<String>? = null, val azureActiveDirectoryRoleBasedAccessControl: Output<KubernetesClusterAzureActiveDirectoryRoleBasedAccessControlArgs>? = null, val azurePolicyEnabled: Output<Boolean>? = null, val confidentialComputing: Output<KubernetesClusterConfidentialComputingArgs>? = null, val customCaTrustCertificatesBase64s: Output<List<String>>? = null, val defaultNodePool: Output<KubernetesClusterDefaultNodePoolArgs>? = null, val diskEncryptionSetId: Output<String>? = null, val dnsPrefix: Output<String>? = null, val dnsPrefixPrivateCluster: Output<String>? = null, val edgeZone: Output<String>? = null, val enablePodSecurityPolicy: Output<Boolean>? = null, val httpApplicationRoutingEnabled: Output<Boolean>? = null, val httpProxyConfig: Output<KubernetesClusterHttpProxyConfigArgs>? = null, val identity: Output<KubernetesClusterIdentityArgs>? = null, val imageCleanerEnabled: Output<Boolean>? = null, val imageCleanerIntervalHours: Output<Int>? = null, val ingressApplicationGateway: Output<KubernetesClusterIngressApplicationGatewayArgs>? = null, val keyManagementService: Output<KubernetesClusterKeyManagementServiceArgs>? = null, val keyVaultSecretsProvider: Output<KubernetesClusterKeyVaultSecretsProviderArgs>? = null, val kubeletIdentity: Output<KubernetesClusterKubeletIdentityArgs>? = null, val kubernetesVersion: Output<String>? = null, val linuxProfile: Output<KubernetesClusterLinuxProfileArgs>? = null, val localAccountDisabled: Output<Boolean>? = null, val location: Output<String>? = null, val maintenanceWindow: Output<KubernetesClusterMaintenanceWindowArgs>? = null, val maintenanceWindowAutoUpgrade: Output<KubernetesClusterMaintenanceWindowAutoUpgradeArgs>? = null, val maintenanceWindowNodeOs: Output<KubernetesClusterMaintenanceWindowNodeOsArgs>? = null, val microsoftDefender: Output<KubernetesClusterMicrosoftDefenderArgs>? = null, val monitorMetrics: Output<KubernetesClusterMonitorMetricsArgs>? = null, val name: Output<String>? = null, val networkProfile: Output<KubernetesClusterNetworkProfileArgs>? = null, val nodeOsChannelUpgrade: Output<String>? = null, val nodeResourceGroup: Output<String>? = null, val oidcIssuerEnabled: Output<Boolean>? = null, val omsAgent: Output<KubernetesClusterOmsAgentArgs>? = null, val openServiceMeshEnabled: Output<Boolean>? = null, val privateClusterEnabled: Output<Boolean>? = null, val privateClusterPublicFqdnEnabled: Output<Boolean>? = null, val privateDnsZoneId: Output<String>? = null, val publicNetworkAccessEnabled: Output<Boolean>? = null, val resourceGroupName: Output<String>? = null, val roleBasedAccessControlEnabled: Output<Boolean>? = null, val runCommandEnabled: Output<Boolean>? = null, val serviceMeshProfile: Output<KubernetesClusterServiceMeshProfileArgs>? = null, val servicePrincipal: Output<KubernetesClusterServicePrincipalArgs>? = null, val skuTier: Output<String>? = null, val storageProfile: Output<KubernetesClusterStorageProfileArgs>? = null, val tags: Output<Map<String, String>>? = null, val webAppRouting: Output<KubernetesClusterWebAppRoutingArgs>? = null, val windowsProfile: Output<KubernetesClusterWindowsProfileArgs>? = null, val workloadAutoscalerProfile: Output<KubernetesClusterWorkloadAutoscalerProfileArgs>? = null, val workloadIdentityEnabled: Output<Boolean>? = null) : ConvertibleToJava<KubernetesClusterArgs>

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

Link copied to clipboard
fun KubernetesClusterArgs(aciConnectorLinux: Output<KubernetesClusterAciConnectorLinuxArgs>? = null, apiServerAccessProfile: Output<KubernetesClusterApiServerAccessProfileArgs>? = null, apiServerAuthorizedIpRanges: Output<List<String>>? = null, autoScalerProfile: Output<KubernetesClusterAutoScalerProfileArgs>? = null, automaticChannelUpgrade: Output<String>? = null, azureActiveDirectoryRoleBasedAccessControl: Output<KubernetesClusterAzureActiveDirectoryRoleBasedAccessControlArgs>? = null, azurePolicyEnabled: Output<Boolean>? = null, confidentialComputing: Output<KubernetesClusterConfidentialComputingArgs>? = null, customCaTrustCertificatesBase64s: Output<List<String>>? = null, defaultNodePool: Output<KubernetesClusterDefaultNodePoolArgs>? = null, diskEncryptionSetId: Output<String>? = null, dnsPrefix: Output<String>? = null, dnsPrefixPrivateCluster: Output<String>? = null, edgeZone: Output<String>? = null, enablePodSecurityPolicy: Output<Boolean>? = null, httpApplicationRoutingEnabled: Output<Boolean>? = null, httpProxyConfig: Output<KubernetesClusterHttpProxyConfigArgs>? = null, identity: Output<KubernetesClusterIdentityArgs>? = null, imageCleanerEnabled: Output<Boolean>? = null, imageCleanerIntervalHours: Output<Int>? = null, ingressApplicationGateway: Output<KubernetesClusterIngressApplicationGatewayArgs>? = null, keyManagementService: Output<KubernetesClusterKeyManagementServiceArgs>? = null, keyVaultSecretsProvider: Output<KubernetesClusterKeyVaultSecretsProviderArgs>? = null, kubeletIdentity: Output<KubernetesClusterKubeletIdentityArgs>? = null, kubernetesVersion: Output<String>? = null, linuxProfile: Output<KubernetesClusterLinuxProfileArgs>? = null, localAccountDisabled: Output<Boolean>? = null, location: Output<String>? = null, maintenanceWindow: Output<KubernetesClusterMaintenanceWindowArgs>? = null, maintenanceWindowAutoUpgrade: Output<KubernetesClusterMaintenanceWindowAutoUpgradeArgs>? = null, maintenanceWindowNodeOs: Output<KubernetesClusterMaintenanceWindowNodeOsArgs>? = null, microsoftDefender: Output<KubernetesClusterMicrosoftDefenderArgs>? = null, monitorMetrics: Output<KubernetesClusterMonitorMetricsArgs>? = null, name: Output<String>? = null, networkProfile: Output<KubernetesClusterNetworkProfileArgs>? = null, nodeOsChannelUpgrade: Output<String>? = null, nodeResourceGroup: Output<String>? = null, oidcIssuerEnabled: Output<Boolean>? = null, omsAgent: Output<KubernetesClusterOmsAgentArgs>? = null, openServiceMeshEnabled: Output<Boolean>? = null, privateClusterEnabled: Output<Boolean>? = null, privateClusterPublicFqdnEnabled: Output<Boolean>? = null, privateDnsZoneId: Output<String>? = null, publicNetworkAccessEnabled: Output<Boolean>? = null, resourceGroupName: Output<String>? = null, roleBasedAccessControlEnabled: Output<Boolean>? = null, runCommandEnabled: Output<Boolean>? = null, serviceMeshProfile: Output<KubernetesClusterServiceMeshProfileArgs>? = null, servicePrincipal: Output<KubernetesClusterServicePrincipalArgs>? = null, skuTier: Output<String>? = null, storageProfile: Output<KubernetesClusterStorageProfileArgs>? = null, tags: Output<Map<String, String>>? = null, webAppRouting: Output<KubernetesClusterWebAppRoutingArgs>? = null, windowsProfile: Output<KubernetesClusterWindowsProfileArgs>? = null, workloadAutoscalerProfile: Output<KubernetesClusterWorkloadAutoscalerProfileArgs>? = null, workloadIdentityEnabled: Output<Boolean>? = null)

Functions

Link copied to clipboard
open override fun toJava(): KubernetesClusterArgs

Properties

Link copied to clipboard

A aci_connector_linux block as defined below. For more details, please visit Create and configure an AKS cluster to use virtual nodes.

Link copied to clipboard

An api_server_access_profile block as defined below.

Link copied to clipboard
Link copied to clipboard
val automaticChannelUpgrade: Output<String>? = null

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.

Link copied to clipboard

A auto_scaler_profile block as defined below.

A azure_active_directory_role_based_access_control block as defined below.

Link copied to clipboard
val azurePolicyEnabled: Output<Boolean>? = null

Should the Azure Policy Add-On be enabled? For more details please visit Understand Azure Policy for Azure Kubernetes Service

Link copied to clipboard

A confidential_computing block as defined below. For more details please the documentation

Link copied to clipboard

A list of up to 10 base64 encoded CAs that will be added to the trust store on nodes with the custom_ca_trust_enabled feature enabled.

Link copied to clipboard

A default_node_pool block as defined below.

Link copied to clipboard
val diskEncryptionSetId: Output<String>? = null

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.

Link copied to clipboard
val dnsPrefix: Output<String>? = null

DNS prefix specified when creating the managed cluster. Possible values must begin and end with a letter or number, contain only letters, numbers, and hyphens and be between 1 and 54 characters in length. Changing this forces a new resource to be created.

Link copied to clipboard
val dnsPrefixPrivateCluster: Output<String>? = null

Specifies the DNS prefix to use with private clusters. Changing this forces a new resource to be created.

Link copied to clipboard
val edgeZone: Output<String>? = null

Specifies the Edge Zone within the Azure Region where this Managed Kubernetes Cluster should exist. Changing this forces a new resource to be created.

Link copied to clipboard
val enablePodSecurityPolicy: Output<Boolean>? = null
Link copied to clipboard

Should HTTP Application Routing be enabled?

Link copied to clipboard

A http_proxy_config block as defined below.

Link copied to clipboard

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.

Link copied to clipboard
val imageCleanerEnabled: Output<Boolean>? = null

Specifies whether Image Cleaner is enabled.

Link copied to clipboard
val imageCleanerIntervalHours: Output<Int>? = null

Specifies the interval in hours when images should be cleaned up. Defaults to 48.

Link copied to clipboard

A ingress_application_gateway block as defined below.

Link copied to clipboard

A key_management_service block as defined below. For more details, please visit Key Management Service (KMS) etcd encryption to an AKS cluster.

Link copied to clipboard

A key_vault_secrets_provider block as defined below. For more details, please visit Azure Keyvault Secrets Provider for AKS.

Link copied to clipboard

A kubelet_identity block as defined below.

Link copied to clipboard
val kubernetesVersion: Output<String>? = null

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.

Link copied to clipboard

A linux_profile block as defined below.

Link copied to clipboard
val localAccountDisabled: Output<Boolean>? = null

If true local accounts will be disabled. See the documentation for more information.

Link copied to clipboard
val location: Output<String>? = null

The location where the Managed Kubernetes Cluster should be created. Changing this forces a new resource to be created.

Link copied to clipboard

A maintenance_window block as defined below.

Link copied to clipboard

A maintenance_window_auto_upgrade block as defined below.

Link copied to clipboard

A maintenance_window_node_os block as defined below.

Link copied to clipboard

A microsoft_defender block as defined below.

Link copied to clipboard

Specifies a Prometheus add-on profile for the Kubernetes Cluster. A monitor_metrics block as defined below.

Link copied to clipboard
val name: Output<String>? = null

The name of the Managed Kubernetes Cluster to create. Changing this forces a new resource to be created.

Link copied to clipboard

A network_profile block as defined below. Changing this forces a new resource to be created.

Link copied to clipboard
val nodeOsChannelUpgrade: Output<String>? = null

The upgrade channel for this Kubernetes Cluster Nodes' OS Image. Possible values are Unmanaged, SecurityPatch, NodeImage and None.

Link copied to clipboard
val nodeResourceGroup: Output<String>? = null

The name of the Resource Group where the Kubernetes Nodes should exist. Changing this forces a new resource to be created.

Link copied to clipboard
val oidcIssuerEnabled: Output<Boolean>? = null

Enable or Disable the OIDC issuer URL

Link copied to clipboard

A oms_agent block as defined below.

Link copied to clipboard
val openServiceMeshEnabled: Output<Boolean>? = null

Is Open Service Mesh enabled? For more details, please visit Open Service Mesh for AKS.

Link copied to clipboard
val privateClusterEnabled: Output<Boolean>? = null

Should this Kubernetes Cluster have its API server only exposed on internal IP addresses? This provides a Private IP Address for the Kubernetes API on the Virtual Network where the Kubernetes Cluster is located. Defaults to false. Changing this forces a new resource to be created.

Link copied to clipboard

Specifies whether a Public FQDN for this Private Cluster should be added. Defaults to false.

Link copied to clipboard
val privateDnsZoneId: Output<String>? = null

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.

Link copied to clipboard
val publicNetworkAccessEnabled: Output<Boolean>? = null

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.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

Specifies the Resource Group where the Managed Kubernetes Cluster should exist. Changing this forces a new resource to be created.

Link copied to clipboard

Whether Role Based Access Control for the Kubernetes Cluster should be enabled. Defaults to true. Changing this forces a new resource to be created.

Link copied to clipboard
val runCommandEnabled: Output<Boolean>? = null

Whether to enable run command for the cluster or not. Defaults to true.

Link copied to clipboard

A service_mesh_profile block as defined below.

Link copied to clipboard

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.

Link copied to clipboard
val skuTier: Output<String>? = null

The SKU Tier that should be used for this Kubernetes Cluster. Possible values are Free, and Standard (which includes the Uptime SLA). Defaults to Free.

Link copied to clipboard

A storage_profile block as defined below.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

A mapping of tags to assign to the resource.

Link copied to clipboard

A web_app_routing block as defined below.

Link copied to clipboard

A windows_profile block as defined below.

Link copied to clipboard

A workload_autoscaler_profile block defined below.

Link copied to clipboard
val workloadIdentityEnabled: Output<Boolean>? = null

Specifies whether Azure AD Workload Identity should be enabled for the Cluster. Defaults to false.