ManagedCluster

class ManagedCluster : KotlinCustomResource

Managed cluster. API Version: 2021-03-01.

Example Usage

Create Managed Cluster with Azure KeyVault Secrets Provider Addon

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var managedCluster = new AzureNative.ContainerService.ManagedCluster("managedCluster", new()
{
AddonProfiles =
{
{ "azureKeyvaultSecretsProvider", new AzureNative.ContainerService.Inputs.ManagedClusterAddonProfileArgs
{
Config =
{
{ "enableSecretRotation", "true" },
},
Enabled = true,
} },
},
AgentPoolProfiles = new[]
{
new AzureNative.ContainerService.Inputs.ManagedClusterAgentPoolProfileArgs
{
Count = 3,
EnableNodePublicIP = true,
Mode = "System",
Name = "nodepool1",
OsType = "Linux",
Type = "VirtualMachineScaleSets",
VmSize = "Standard_DS2_v2",
},
},
AutoScalerProfile = new AzureNative.ContainerService.Inputs.ManagedClusterPropertiesAutoScalerProfileArgs
{
ScaleDownDelayAfterAdd = "15m",
ScanInterval = "20s",
},
DiskEncryptionSetID = "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des",
DnsPrefix = "dnsprefix1",
EnablePodSecurityPolicy = true,
EnableRBAC = true,
KubernetesVersion = "",
LinuxProfile = new AzureNative.ContainerService.Inputs.ContainerServiceLinuxProfileArgs
{
AdminUsername = "azureuser",
Ssh = new AzureNative.ContainerService.Inputs.ContainerServiceSshConfigurationArgs
{
PublicKeys = new[]
{
new AzureNative.ContainerService.Inputs.ContainerServiceSshPublicKeyArgs
{
KeyData = "keydata",
},
},
},
},
Location = "location1",
NetworkProfile = new AzureNative.ContainerService.Inputs.ContainerServiceNetworkProfileArgs
{
LoadBalancerProfile = new AzureNative.ContainerService.Inputs.ManagedClusterLoadBalancerProfileArgs
{
ManagedOutboundIPs = new AzureNative.ContainerService.Inputs.ManagedClusterLoadBalancerProfileManagedOutboundIPsArgs
{
Count = 2,
},
},
LoadBalancerSku = "standard",
OutboundType = "loadBalancer",
},
ResourceGroupName = "rg1",
ResourceName = "clustername1",
ServicePrincipalProfile = new AzureNative.ContainerService.Inputs.ManagedClusterServicePrincipalProfileArgs
{
ClientId = "clientid",
Secret = "secret",
},
Sku = new AzureNative.ContainerService.Inputs.ManagedClusterSKUArgs
{
Name = "Basic",
Tier = "Free",
},
Tags =
{
{ "archv2", "" },
{ "tier", "production" },
},
WindowsProfile = new AzureNative.ContainerService.Inputs.ManagedClusterWindowsProfileArgs
{
AdminPassword = "replacePassword1234$",
AdminUsername = "azureuser",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.containerservice.ManagedCluster;
import com.pulumi.azurenative.containerservice.ManagedClusterArgs;
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 managedCluster = new ManagedCluster("managedCluster", ManagedClusterArgs.builder()
.addonProfiles(Map.of("azureKeyvaultSecretsProvider", Map.ofEntries(
Map.entry("config", Map.of("enableSecretRotation", "true")),
Map.entry("enabled", true)
)))
.agentPoolProfiles(Map.ofEntries(
Map.entry("count", 3),
Map.entry("enableNodePublicIP", true),
Map.entry("mode", "System"),
Map.entry("name", "nodepool1"),
Map.entry("osType", "Linux"),
Map.entry("type", "VirtualMachineScaleSets"),
Map.entry("vmSize", "Standard_DS2_v2")
))
.autoScalerProfile(Map.ofEntries(
Map.entry("scaleDownDelayAfterAdd", "15m"),
Map.entry("scanInterval", "20s")
))
.diskEncryptionSetID("/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des")
.dnsPrefix("dnsprefix1")
.enablePodSecurityPolicy(true)
.enableRBAC(true)
.kubernetesVersion("")
.linuxProfile(Map.ofEntries(
Map.entry("adminUsername", "azureuser"),
Map.entry("ssh", Map.of("publicKeys", Map.of("keyData", "keydata")))
))
.location("location1")
.networkProfile(Map.ofEntries(
Map.entry("loadBalancerProfile", Map.of("managedOutboundIPs", Map.of("count", 2))),
Map.entry("loadBalancerSku", "standard"),
Map.entry("outboundType", "loadBalancer")
))
.resourceGroupName("rg1")
.resourceName("clustername1")
.servicePrincipalProfile(Map.ofEntries(
Map.entry("clientId", "clientid"),
Map.entry("secret", "secret")
))
.sku(Map.ofEntries(
Map.entry("name", "Basic"),
Map.entry("tier", "Free")
))
.tags(Map.ofEntries(
Map.entry("archv2", ""),
Map.entry("tier", "production")
))
.windowsProfile(Map.ofEntries(
Map.entry("adminPassword", "replacePassword1234$"),
Map.entry("adminUsername", "azureuser")
))
.build());
}
}

Create Managed Cluster with EncryptionAtHost enabled

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var managedCluster = new AzureNative.ContainerService.ManagedCluster("managedCluster", new()
{
AddonProfiles = null,
AgentPoolProfiles = new[]
{
new AzureNative.ContainerService.Inputs.ManagedClusterAgentPoolProfileArgs
{
Count = 3,
EnableEncryptionAtHost = true,
EnableNodePublicIP = true,
Mode = "System",
Name = "nodepool1",
OsType = "Linux",
Type = "VirtualMachineScaleSets",
VmSize = "Standard_DS2_v2",
},
},
AutoScalerProfile = new AzureNative.ContainerService.Inputs.ManagedClusterPropertiesAutoScalerProfileArgs
{
ScaleDownDelayAfterAdd = "15m",
ScanInterval = "20s",
},
DiskEncryptionSetID = "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des",
DnsPrefix = "dnsprefix1",
EnablePodSecurityPolicy = true,
EnableRBAC = true,
KubernetesVersion = "",
LinuxProfile = new AzureNative.ContainerService.Inputs.ContainerServiceLinuxProfileArgs
{
AdminUsername = "azureuser",
Ssh = new AzureNative.ContainerService.Inputs.ContainerServiceSshConfigurationArgs
{
PublicKeys = new[]
{
new AzureNative.ContainerService.Inputs.ContainerServiceSshPublicKeyArgs
{
KeyData = "keydata",
},
},
},
},
Location = "location1",
NetworkProfile = new AzureNative.ContainerService.Inputs.ContainerServiceNetworkProfileArgs
{
LoadBalancerProfile = new AzureNative.ContainerService.Inputs.ManagedClusterLoadBalancerProfileArgs
{
ManagedOutboundIPs = new AzureNative.ContainerService.Inputs.ManagedClusterLoadBalancerProfileManagedOutboundIPsArgs
{
Count = 2,
},
},
LoadBalancerSku = "standard",
OutboundType = "loadBalancer",
},
ResourceGroupName = "rg1",
ResourceName = "clustername1",
ServicePrincipalProfile = new AzureNative.ContainerService.Inputs.ManagedClusterServicePrincipalProfileArgs
{
ClientId = "clientid",
Secret = "secret",
},
Sku = new AzureNative.ContainerService.Inputs.ManagedClusterSKUArgs
{
Name = "Basic",
Tier = "Free",
},
Tags =
{
{ "archv2", "" },
{ "tier", "production" },
},
WindowsProfile = new AzureNative.ContainerService.Inputs.ManagedClusterWindowsProfileArgs
{
AdminPassword = "replacePassword1234$",
AdminUsername = "azureuser",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.containerservice.ManagedCluster;
import com.pulumi.azurenative.containerservice.ManagedClusterArgs;
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 managedCluster = new ManagedCluster("managedCluster", ManagedClusterArgs.builder()
.addonProfiles()
.agentPoolProfiles(Map.ofEntries(
Map.entry("count", 3),
Map.entry("enableEncryptionAtHost", true),
Map.entry("enableNodePublicIP", true),
Map.entry("mode", "System"),
Map.entry("name", "nodepool1"),
Map.entry("osType", "Linux"),
Map.entry("type", "VirtualMachineScaleSets"),
Map.entry("vmSize", "Standard_DS2_v2")
))
.autoScalerProfile(Map.ofEntries(
Map.entry("scaleDownDelayAfterAdd", "15m"),
Map.entry("scanInterval", "20s")
))
.diskEncryptionSetID("/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des")
.dnsPrefix("dnsprefix1")
.enablePodSecurityPolicy(true)
.enableRBAC(true)
.kubernetesVersion("")
.linuxProfile(Map.ofEntries(
Map.entry("adminUsername", "azureuser"),
Map.entry("ssh", Map.of("publicKeys", Map.of("keyData", "keydata")))
))
.location("location1")
.networkProfile(Map.ofEntries(
Map.entry("loadBalancerProfile", Map.of("managedOutboundIPs", Map.of("count", 2))),
Map.entry("loadBalancerSku", "standard"),
Map.entry("outboundType", "loadBalancer")
))
.resourceGroupName("rg1")
.resourceName("clustername1")
.servicePrincipalProfile(Map.ofEntries(
Map.entry("clientId", "clientid"),
Map.entry("secret", "secret")
))
.sku(Map.ofEntries(
Map.entry("name", "Basic"),
Map.entry("tier", "Free")
))
.tags(Map.ofEntries(
Map.entry("archv2", ""),
Map.entry("tier", "production")
))
.windowsProfile(Map.ofEntries(
Map.entry("adminPassword", "replacePassword1234$"),
Map.entry("adminUsername", "azureuser")
))
.build());
}
}

Create Managed Cluster with FIPS enabled OS

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var managedCluster = new AzureNative.ContainerService.ManagedCluster("managedCluster", new()
{
AddonProfiles = null,
AgentPoolProfiles = new[]
{
new AzureNative.ContainerService.Inputs.ManagedClusterAgentPoolProfileArgs
{
Count = 3,
EnableFIPS = true,
EnableNodePublicIP = true,
Mode = "System",
Name = "nodepool1",
OsType = "Linux",
Type = "VirtualMachineScaleSets",
VmSize = "Standard_DS2_v2",
},
},
AutoScalerProfile = new AzureNative.ContainerService.Inputs.ManagedClusterPropertiesAutoScalerProfileArgs
{
ScaleDownDelayAfterAdd = "15m",
ScanInterval = "20s",
},
DiskEncryptionSetID = "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des",
DnsPrefix = "dnsprefix1",
EnablePodSecurityPolicy = false,
EnableRBAC = true,
KubernetesVersion = "",
LinuxProfile = new AzureNative.ContainerService.Inputs.ContainerServiceLinuxProfileArgs
{
AdminUsername = "azureuser",
Ssh = new AzureNative.ContainerService.Inputs.ContainerServiceSshConfigurationArgs
{
PublicKeys = new[]
{
new AzureNative.ContainerService.Inputs.ContainerServiceSshPublicKeyArgs
{
KeyData = "keydata",
},
},
},
},
Location = "location1",
NetworkProfile = new AzureNative.ContainerService.Inputs.ContainerServiceNetworkProfileArgs
{
LoadBalancerProfile = new AzureNative.ContainerService.Inputs.ManagedClusterLoadBalancerProfileArgs
{
ManagedOutboundIPs = new AzureNative.ContainerService.Inputs.ManagedClusterLoadBalancerProfileManagedOutboundIPsArgs
{
Count = 2,
},
},
LoadBalancerSku = "standard",
OutboundType = "loadBalancer",
},
ResourceGroupName = "rg1",
ResourceName = "clustername1",
ServicePrincipalProfile = new AzureNative.ContainerService.Inputs.ManagedClusterServicePrincipalProfileArgs
{
ClientId = "clientid",
Secret = "secret",
},
Sku = new AzureNative.ContainerService.Inputs.ManagedClusterSKUArgs
{
Name = "Basic",
Tier = "Free",
},
Tags =
{
{ "archv2", "" },
{ "tier", "production" },
},
WindowsProfile = new AzureNative.ContainerService.Inputs.ManagedClusterWindowsProfileArgs
{
AdminPassword = "replacePassword1234$",
AdminUsername = "azureuser",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.containerservice.ManagedCluster;
import com.pulumi.azurenative.containerservice.ManagedClusterArgs;
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 managedCluster = new ManagedCluster("managedCluster", ManagedClusterArgs.builder()
.addonProfiles()
.agentPoolProfiles(Map.ofEntries(
Map.entry("count", 3),
Map.entry("enableFIPS", true),
Map.entry("enableNodePublicIP", true),
Map.entry("mode", "System"),
Map.entry("name", "nodepool1"),
Map.entry("osType", "Linux"),
Map.entry("type", "VirtualMachineScaleSets"),
Map.entry("vmSize", "Standard_DS2_v2")
))
.autoScalerProfile(Map.ofEntries(
Map.entry("scaleDownDelayAfterAdd", "15m"),
Map.entry("scanInterval", "20s")
))
.diskEncryptionSetID("/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des")
.dnsPrefix("dnsprefix1")
.enablePodSecurityPolicy(false)
.enableRBAC(true)
.kubernetesVersion("")
.linuxProfile(Map.ofEntries(
Map.entry("adminUsername", "azureuser"),
Map.entry("ssh", Map.of("publicKeys", Map.of("keyData", "keydata")))
))
.location("location1")
.networkProfile(Map.ofEntries(
Map.entry("loadBalancerProfile", Map.of("managedOutboundIPs", Map.of("count", 2))),
Map.entry("loadBalancerSku", "standard"),
Map.entry("outboundType", "loadBalancer")
))
.resourceGroupName("rg1")
.resourceName("clustername1")
.servicePrincipalProfile(Map.ofEntries(
Map.entry("clientId", "clientid"),
Map.entry("secret", "secret")
))
.sku(Map.ofEntries(
Map.entry("name", "Basic"),
Map.entry("tier", "Free")
))
.tags(Map.ofEntries(
Map.entry("archv2", ""),
Map.entry("tier", "production")
))
.windowsProfile(Map.ofEntries(
Map.entry("adminPassword", "replacePassword1234$"),
Map.entry("adminUsername", "azureuser")
))
.build());
}
}

Create Managed Cluster with GPUMIG

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var managedCluster = new AzureNative.ContainerService.ManagedCluster("managedCluster", new()
{
AddonProfiles = null,
AgentPoolProfiles = new[]
{
new AzureNative.ContainerService.Inputs.ManagedClusterAgentPoolProfileArgs
{
Count = 3,
EnableNodePublicIP = true,
GpuInstanceProfile = "MIG3g",
Mode = "System",
Name = "nodepool1",
OsType = "Linux",
Type = "VirtualMachineScaleSets",
VmSize = "Standard_ND96asr_v4",
},
},
AutoScalerProfile = new AzureNative.ContainerService.Inputs.ManagedClusterPropertiesAutoScalerProfileArgs
{
ScaleDownDelayAfterAdd = "15m",
ScanInterval = "20s",
},
DiskEncryptionSetID = "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des",
DnsPrefix = "dnsprefix1",
EnablePodSecurityPolicy = true,
EnableRBAC = true,
HttpProxyConfig = new AzureNative.ContainerService.Inputs.ManagedClusterHTTPProxyConfigArgs
{
HttpProxy = "http://myproxy.server.com:8080",
HttpsProxy = "https://myproxy.server.com:8080",
NoProxy = new[]
{
"localhost",
"127.0.0.1",
},
TrustedCa = "Q29uZ3JhdHMhIFlvdSBoYXZlIGZvdW5kIGEgaGlkZGVuIG1lc3NhZ2U=",
},
KubernetesVersion = "",
LinuxProfile = new AzureNative.ContainerService.Inputs.ContainerServiceLinuxProfileArgs
{
AdminUsername = "azureuser",
Ssh = new AzureNative.ContainerService.Inputs.ContainerServiceSshConfigurationArgs
{
PublicKeys = new[]
{
new AzureNative.ContainerService.Inputs.ContainerServiceSshPublicKeyArgs
{
KeyData = "keydata",
},
},
},
},
Location = "location1",
NetworkProfile = new AzureNative.ContainerService.Inputs.ContainerServiceNetworkProfileArgs
{
LoadBalancerProfile = new AzureNative.ContainerService.Inputs.ManagedClusterLoadBalancerProfileArgs
{
ManagedOutboundIPs = new AzureNative.ContainerService.Inputs.ManagedClusterLoadBalancerProfileManagedOutboundIPsArgs
{
Count = 2,
},
},
LoadBalancerSku = "standard",
OutboundType = "loadBalancer",
},
ResourceGroupName = "rg1",
ResourceName = "clustername1",
ServicePrincipalProfile = new AzureNative.ContainerService.Inputs.ManagedClusterServicePrincipalProfileArgs
{
ClientId = "clientid",
Secret = "secret",
},
Sku = new AzureNative.ContainerService.Inputs.ManagedClusterSKUArgs
{
Name = "Basic",
Tier = "Free",
},
Tags =
{
{ "archv2", "" },
{ "tier", "production" },
},
WindowsProfile = new AzureNative.ContainerService.Inputs.ManagedClusterWindowsProfileArgs
{
AdminPassword = "replacePassword1234$",
AdminUsername = "azureuser",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.containerservice.ManagedCluster;
import com.pulumi.azurenative.containerservice.ManagedClusterArgs;
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 managedCluster = new ManagedCluster("managedCluster", ManagedClusterArgs.builder()
.addonProfiles()
.agentPoolProfiles(Map.ofEntries(
Map.entry("count", 3),
Map.entry("enableNodePublicIP", true),
Map.entry("gpuInstanceProfile", "MIG3g"),
Map.entry("mode", "System"),
Map.entry("name", "nodepool1"),
Map.entry("osType", "Linux"),
Map.entry("type", "VirtualMachineScaleSets"),
Map.entry("vmSize", "Standard_ND96asr_v4")
))
.autoScalerProfile(Map.ofEntries(
Map.entry("scaleDownDelayAfterAdd", "15m"),
Map.entry("scanInterval", "20s")
))
.diskEncryptionSetID("/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des")
.dnsPrefix("dnsprefix1")
.enablePodSecurityPolicy(true)
.enableRBAC(true)
.httpProxyConfig(Map.ofEntries(
Map.entry("httpProxy", "http://myproxy.server.com:8080"),
Map.entry("httpsProxy", "https://myproxy.server.com:8080"),
Map.entry("noProxy",
"localhost",
"127.0.0.1"),
Map.entry("trustedCa", "Q29uZ3JhdHMhIFlvdSBoYXZlIGZvdW5kIGEgaGlkZGVuIG1lc3NhZ2U=")
))
.kubernetesVersion("")
.linuxProfile(Map.ofEntries(
Map.entry("adminUsername", "azureuser"),
Map.entry("ssh", Map.of("publicKeys", Map.of("keyData", "keydata")))
))
.location("location1")
.networkProfile(Map.ofEntries(
Map.entry("loadBalancerProfile", Map.of("managedOutboundIPs", Map.of("count", 2))),
Map.entry("loadBalancerSku", "standard"),
Map.entry("outboundType", "loadBalancer")
))
.resourceGroupName("rg1")
.resourceName("clustername1")
.servicePrincipalProfile(Map.ofEntries(
Map.entry("clientId", "clientid"),
Map.entry("secret", "secret")
))
.sku(Map.ofEntries(
Map.entry("name", "Basic"),
Map.entry("tier", "Free")
))
.tags(Map.ofEntries(
Map.entry("archv2", ""),
Map.entry("tier", "production")
))
.windowsProfile(Map.ofEntries(
Map.entry("adminPassword", "replacePassword1234$"),
Map.entry("adminUsername", "azureuser")
))
.build());
}
}

Create Managed Cluster with HTTP proxy configured

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var managedCluster = new AzureNative.ContainerService.ManagedCluster("managedCluster", new()
{
AddonProfiles = null,
AgentPoolProfiles = new[]
{
new AzureNative.ContainerService.Inputs.ManagedClusterAgentPoolProfileArgs
{
Count = 3,
EnableNodePublicIP = true,
Mode = "System",
Name = "nodepool1",
OsType = "Linux",
Type = "VirtualMachineScaleSets",
VmSize = "Standard_DS2_v2",
},
},
AutoScalerProfile = new AzureNative.ContainerService.Inputs.ManagedClusterPropertiesAutoScalerProfileArgs
{
ScaleDownDelayAfterAdd = "15m",
ScanInterval = "20s",
},
DiskEncryptionSetID = "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des",
DnsPrefix = "dnsprefix1",
EnablePodSecurityPolicy = true,
EnableRBAC = true,
HttpProxyConfig = new AzureNative.ContainerService.Inputs.ManagedClusterHTTPProxyConfigArgs
{
HttpProxy = "http://myproxy.server.com:8080",
HttpsProxy = "https://myproxy.server.com:8080",
NoProxy = new[]
{
"localhost",
"127.0.0.1",
},
TrustedCa = "Q29uZ3JhdHMhIFlvdSBoYXZlIGZvdW5kIGEgaGlkZGVuIG1lc3NhZ2U=",
},
KubernetesVersion = "",
LinuxProfile = new AzureNative.ContainerService.Inputs.ContainerServiceLinuxProfileArgs
{
AdminUsername = "azureuser",
Ssh = new AzureNative.ContainerService.Inputs.ContainerServiceSshConfigurationArgs
{
PublicKeys = new[]
{
new AzureNative.ContainerService.Inputs.ContainerServiceSshPublicKeyArgs
{
KeyData = "keydata",
},
},
},
},
Location = "location1",
NetworkProfile = new AzureNative.ContainerService.Inputs.ContainerServiceNetworkProfileArgs
{
LoadBalancerProfile = new AzureNative.ContainerService.Inputs.ManagedClusterLoadBalancerProfileArgs
{
ManagedOutboundIPs = new AzureNative.ContainerService.Inputs.ManagedClusterLoadBalancerProfileManagedOutboundIPsArgs
{
Count = 2,
},
},
LoadBalancerSku = "standard",
OutboundType = "loadBalancer",
},
ResourceGroupName = "rg1",
ResourceName = "clustername1",
ServicePrincipalProfile = new AzureNative.ContainerService.Inputs.ManagedClusterServicePrincipalProfileArgs
{
ClientId = "clientid",
Secret = "secret",
},
Sku = new AzureNative.ContainerService.Inputs.ManagedClusterSKUArgs
{
Name = "Basic",
Tier = "Free",
},
Tags =
{
{ "archv2", "" },
{ "tier", "production" },
},
WindowsProfile = new AzureNative.ContainerService.Inputs.ManagedClusterWindowsProfileArgs
{
AdminPassword = "replacePassword1234$",
AdminUsername = "azureuser",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.containerservice.ManagedCluster;
import com.pulumi.azurenative.containerservice.ManagedClusterArgs;
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 managedCluster = new ManagedCluster("managedCluster", ManagedClusterArgs.builder()
.addonProfiles()
.agentPoolProfiles(Map.ofEntries(
Map.entry("count", 3),
Map.entry("enableNodePublicIP", true),
Map.entry("mode", "System"),
Map.entry("name", "nodepool1"),
Map.entry("osType", "Linux"),
Map.entry("type", "VirtualMachineScaleSets"),
Map.entry("vmSize", "Standard_DS2_v2")
))
.autoScalerProfile(Map.ofEntries(
Map.entry("scaleDownDelayAfterAdd", "15m"),
Map.entry("scanInterval", "20s")
))
.diskEncryptionSetID("/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des")
.dnsPrefix("dnsprefix1")
.enablePodSecurityPolicy(true)
.enableRBAC(true)
.httpProxyConfig(Map.ofEntries(
Map.entry("httpProxy", "http://myproxy.server.com:8080"),
Map.entry("httpsProxy", "https://myproxy.server.com:8080"),
Map.entry("noProxy",
"localhost",
"127.0.0.1"),
Map.entry("trustedCa", "Q29uZ3JhdHMhIFlvdSBoYXZlIGZvdW5kIGEgaGlkZGVuIG1lc3NhZ2U=")
))
.kubernetesVersion("")
.linuxProfile(Map.ofEntries(
Map.entry("adminUsername", "azureuser"),
Map.entry("ssh", Map.of("publicKeys", Map.of("keyData", "keydata")))
))
.location("location1")
.networkProfile(Map.ofEntries(
Map.entry("loadBalancerProfile", Map.of("managedOutboundIPs", Map.of("count", 2))),
Map.entry("loadBalancerSku", "standard"),
Map.entry("outboundType", "loadBalancer")
))
.resourceGroupName("rg1")
.resourceName("clustername1")
.servicePrincipalProfile(Map.ofEntries(
Map.entry("clientId", "clientid"),
Map.entry("secret", "secret")
))
.sku(Map.ofEntries(
Map.entry("name", "Basic"),
Map.entry("tier", "Free")
))
.tags(Map.ofEntries(
Map.entry("archv2", ""),
Map.entry("tier", "production")
))
.windowsProfile(Map.ofEntries(
Map.entry("adminPassword", "replacePassword1234$"),
Map.entry("adminUsername", "azureuser")
))
.build());
}
}

Create Managed Cluster with Node Public IP Prefix

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var managedCluster = new AzureNative.ContainerService.ManagedCluster("managedCluster", new()
{
AddonProfiles = null,
AgentPoolProfiles = new[]
{
new AzureNative.ContainerService.Inputs.ManagedClusterAgentPoolProfileArgs
{
Count = 3,
EnableNodePublicIP = true,
Mode = "System",
Name = "nodepool1",
NodePublicIPPrefixID = "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.Network/publicIPPrefixes/public-ip-prefix",
OsType = "Linux",
Type = "VirtualMachineScaleSets",
VmSize = "Standard_DS2_v2",
},
},
AutoScalerProfile = new AzureNative.ContainerService.Inputs.ManagedClusterPropertiesAutoScalerProfileArgs
{
ScaleDownDelayAfterAdd = "15m",
ScanInterval = "20s",
},
DiskEncryptionSetID = "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des",
DnsPrefix = "dnsprefix1",
EnablePodSecurityPolicy = true,
EnableRBAC = true,
KubernetesVersion = "",
LinuxProfile = new AzureNative.ContainerService.Inputs.ContainerServiceLinuxProfileArgs
{
AdminUsername = "azureuser",
Ssh = new AzureNative.ContainerService.Inputs.ContainerServiceSshConfigurationArgs
{
PublicKeys = new[]
{
new AzureNative.ContainerService.Inputs.ContainerServiceSshPublicKeyArgs
{
KeyData = "keydata",
},
},
},
},
Location = "location1",
NetworkProfile = new AzureNative.ContainerService.Inputs.ContainerServiceNetworkProfileArgs
{
LoadBalancerProfile = new AzureNative.ContainerService.Inputs.ManagedClusterLoadBalancerProfileArgs
{
ManagedOutboundIPs = new AzureNative.ContainerService.Inputs.ManagedClusterLoadBalancerProfileManagedOutboundIPsArgs
{
Count = 2,
},
},
LoadBalancerSku = "standard",
OutboundType = "loadBalancer",
},
ResourceGroupName = "rg1",
ResourceName = "clustername1",
ServicePrincipalProfile = new AzureNative.ContainerService.Inputs.ManagedClusterServicePrincipalProfileArgs
{
ClientId = "clientid",
Secret = "secret",
},
Sku = new AzureNative.ContainerService.Inputs.ManagedClusterSKUArgs
{
Name = "Basic",
Tier = "Free",
},
Tags =
{
{ "archv2", "" },
{ "tier", "production" },
},
WindowsProfile = new AzureNative.ContainerService.Inputs.ManagedClusterWindowsProfileArgs
{
AdminPassword = "replacePassword1234$",
AdminUsername = "azureuser",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.containerservice.ManagedCluster;
import com.pulumi.azurenative.containerservice.ManagedClusterArgs;
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 managedCluster = new ManagedCluster("managedCluster", ManagedClusterArgs.builder()
.addonProfiles()
.agentPoolProfiles(Map.ofEntries(
Map.entry("count", 3),
Map.entry("enableNodePublicIP", true),
Map.entry("mode", "System"),
Map.entry("name", "nodepool1"),
Map.entry("nodePublicIPPrefixID", "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.Network/publicIPPrefixes/public-ip-prefix"),
Map.entry("osType", "Linux"),
Map.entry("type", "VirtualMachineScaleSets"),
Map.entry("vmSize", "Standard_DS2_v2")
))
.autoScalerProfile(Map.ofEntries(
Map.entry("scaleDownDelayAfterAdd", "15m"),
Map.entry("scanInterval", "20s")
))
.diskEncryptionSetID("/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des")
.dnsPrefix("dnsprefix1")
.enablePodSecurityPolicy(true)
.enableRBAC(true)
.kubernetesVersion("")
.linuxProfile(Map.ofEntries(
Map.entry("adminUsername", "azureuser"),
Map.entry("ssh", Map.of("publicKeys", Map.of("keyData", "keydata")))
))
.location("location1")
.networkProfile(Map.ofEntries(
Map.entry("loadBalancerProfile", Map.of("managedOutboundIPs", Map.of("count", 2))),
Map.entry("loadBalancerSku", "standard"),
Map.entry("outboundType", "loadBalancer")
))
.resourceGroupName("rg1")
.resourceName("clustername1")
.servicePrincipalProfile(Map.ofEntries(
Map.entry("clientId", "clientid"),
Map.entry("secret", "secret")
))
.sku(Map.ofEntries(
Map.entry("name", "Basic"),
Map.entry("tier", "Free")
))
.tags(Map.ofEntries(
Map.entry("archv2", ""),
Map.entry("tier", "production")
))
.windowsProfile(Map.ofEntries(
Map.entry("adminPassword", "replacePassword1234$"),
Map.entry("adminUsername", "azureuser")
))
.build());
}
}

Create Managed Cluster with OSSKU

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var managedCluster = new AzureNative.ContainerService.ManagedCluster("managedCluster", new()
{
AddonProfiles = null,
AgentPoolProfiles = new[]
{
new AzureNative.ContainerService.Inputs.ManagedClusterAgentPoolProfileArgs
{
Count = 3,
EnableNodePublicIP = true,
Mode = "System",
Name = "nodepool1",
OsSKU = "CBLMariner",
OsType = "Linux",
Type = "VirtualMachineScaleSets",
VmSize = "Standard_DS2_v2",
},
},
AutoScalerProfile = new AzureNative.ContainerService.Inputs.ManagedClusterPropertiesAutoScalerProfileArgs
{
ScaleDownDelayAfterAdd = "15m",
ScanInterval = "20s",
},
DiskEncryptionSetID = "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des",
DnsPrefix = "dnsprefix1",
EnablePodSecurityPolicy = true,
EnableRBAC = true,
HttpProxyConfig = new AzureNative.ContainerService.Inputs.ManagedClusterHTTPProxyConfigArgs
{
HttpProxy = "http://myproxy.server.com:8080",
HttpsProxy = "https://myproxy.server.com:8080",
NoProxy = new[]
{
"localhost",
"127.0.0.1",
},
TrustedCa = "Q29uZ3JhdHMhIFlvdSBoYXZlIGZvdW5kIGEgaGlkZGVuIG1lc3NhZ2U=",
},
KubernetesVersion = "",
LinuxProfile = new AzureNative.ContainerService.Inputs.ContainerServiceLinuxProfileArgs
{
AdminUsername = "azureuser",
Ssh = new AzureNative.ContainerService.Inputs.ContainerServiceSshConfigurationArgs
{
PublicKeys = new[]
{
new AzureNative.ContainerService.Inputs.ContainerServiceSshPublicKeyArgs
{
KeyData = "keydata",
},
},
},
},
Location = "location1",
NetworkProfile = new AzureNative.ContainerService.Inputs.ContainerServiceNetworkProfileArgs
{
LoadBalancerProfile = new AzureNative.ContainerService.Inputs.ManagedClusterLoadBalancerProfileArgs
{
ManagedOutboundIPs = new AzureNative.ContainerService.Inputs.ManagedClusterLoadBalancerProfileManagedOutboundIPsArgs
{
Count = 2,
},
},
LoadBalancerSku = "standard",
OutboundType = "loadBalancer",
},
ResourceGroupName = "rg1",
ResourceName = "clustername1",
ServicePrincipalProfile = new AzureNative.ContainerService.Inputs.ManagedClusterServicePrincipalProfileArgs
{
ClientId = "clientid",
Secret = "secret",
},
Sku = new AzureNative.ContainerService.Inputs.ManagedClusterSKUArgs
{
Name = "Basic",
Tier = "Free",
},
Tags =
{
{ "archv2", "" },
{ "tier", "production" },
},
WindowsProfile = new AzureNative.ContainerService.Inputs.ManagedClusterWindowsProfileArgs
{
AdminPassword = "replacePassword1234$",
AdminUsername = "azureuser",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.containerservice.ManagedCluster;
import com.pulumi.azurenative.containerservice.ManagedClusterArgs;
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 managedCluster = new ManagedCluster("managedCluster", ManagedClusterArgs.builder()
.addonProfiles()
.agentPoolProfiles(Map.ofEntries(
Map.entry("count", 3),
Map.entry("enableNodePublicIP", true),
Map.entry("mode", "System"),
Map.entry("name", "nodepool1"),
Map.entry("osSKU", "CBLMariner"),
Map.entry("osType", "Linux"),
Map.entry("type", "VirtualMachineScaleSets"),
Map.entry("vmSize", "Standard_DS2_v2")
))
.autoScalerProfile(Map.ofEntries(
Map.entry("scaleDownDelayAfterAdd", "15m"),
Map.entry("scanInterval", "20s")
))
.diskEncryptionSetID("/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des")
.dnsPrefix("dnsprefix1")
.enablePodSecurityPolicy(true)
.enableRBAC(true)
.httpProxyConfig(Map.ofEntries(
Map.entry("httpProxy", "http://myproxy.server.com:8080"),
Map.entry("httpsProxy", "https://myproxy.server.com:8080"),
Map.entry("noProxy",
"localhost",
"127.0.0.1"),
Map.entry("trustedCa", "Q29uZ3JhdHMhIFlvdSBoYXZlIGZvdW5kIGEgaGlkZGVuIG1lc3NhZ2U=")
))
.kubernetesVersion("")
.linuxProfile(Map.ofEntries(
Map.entry("adminUsername", "azureuser"),
Map.entry("ssh", Map.of("publicKeys", Map.of("keyData", "keydata")))
))
.location("location1")
.networkProfile(Map.ofEntries(
Map.entry("loadBalancerProfile", Map.of("managedOutboundIPs", Map.of("count", 2))),
Map.entry("loadBalancerSku", "standard"),
Map.entry("outboundType", "loadBalancer")
))
.resourceGroupName("rg1")
.resourceName("clustername1")
.servicePrincipalProfile(Map.ofEntries(
Map.entry("clientId", "clientid"),
Map.entry("secret", "secret")
))
.sku(Map.ofEntries(
Map.entry("name", "Basic"),
Map.entry("tier", "Free")
))
.tags(Map.ofEntries(
Map.entry("archv2", ""),
Map.entry("tier", "production")
))
.windowsProfile(Map.ofEntries(
Map.entry("adminPassword", "replacePassword1234$"),
Map.entry("adminUsername", "azureuser")
))
.build());
}
}

Create Managed Cluster with PPG

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var managedCluster = new AzureNative.ContainerService.ManagedCluster("managedCluster", new()
{
AddonProfiles = null,
AgentPoolProfiles = new[]
{
new AzureNative.ContainerService.Inputs.ManagedClusterAgentPoolProfileArgs
{
Count = 3,
EnableNodePublicIP = true,
Mode = "System",
Name = "nodepool1",
OsType = "Linux",
ProximityPlacementGroupID = "/subscriptions/subid1/resourcegroups/rg1/providers//Microsoft.Compute/proximityPlacementGroups/ppg1",
Type = "VirtualMachineScaleSets",
VmSize = "Standard_DS2_v2",
},
},
AutoScalerProfile = new AzureNative.ContainerService.Inputs.ManagedClusterPropertiesAutoScalerProfileArgs
{
ScaleDownDelayAfterAdd = "15m",
ScanInterval = "20s",
},
DiskEncryptionSetID = "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des",
DnsPrefix = "dnsprefix1",
EnablePodSecurityPolicy = true,
EnableRBAC = true,
KubernetesVersion = "",
LinuxProfile = new AzureNative.ContainerService.Inputs.ContainerServiceLinuxProfileArgs
{
AdminUsername = "azureuser",
Ssh = new AzureNative.ContainerService.Inputs.ContainerServiceSshConfigurationArgs
{
PublicKeys = new[]
{
new AzureNative.ContainerService.Inputs.ContainerServiceSshPublicKeyArgs
{
KeyData = "keydata",
},
},
},
},
Location = "location1",
NetworkProfile = new AzureNative.ContainerService.Inputs.ContainerServiceNetworkProfileArgs
{
LoadBalancerProfile = new AzureNative.ContainerService.Inputs.ManagedClusterLoadBalancerProfileArgs
{
ManagedOutboundIPs = new AzureNative.ContainerService.Inputs.ManagedClusterLoadBalancerProfileManagedOutboundIPsArgs
{
Count = 2,
},
},
LoadBalancerSku = "standard",
OutboundType = "loadBalancer",
},
ResourceGroupName = "rg1",
ResourceName = "clustername1",
ServicePrincipalProfile = new AzureNative.ContainerService.Inputs.ManagedClusterServicePrincipalProfileArgs
{
ClientId = "clientid",
Secret = "secret",
},
Sku = new AzureNative.ContainerService.Inputs.ManagedClusterSKUArgs
{
Name = "Basic",
Tier = "Free",
},
Tags =
{
{ "archv2", "" },
{ "tier", "production" },
},
WindowsProfile = new AzureNative.ContainerService.Inputs.ManagedClusterWindowsProfileArgs
{
AdminPassword = "replacePassword1234$",
AdminUsername = "azureuser",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.containerservice.ManagedCluster;
import com.pulumi.azurenative.containerservice.ManagedClusterArgs;
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 managedCluster = new ManagedCluster("managedCluster", ManagedClusterArgs.builder()
.addonProfiles()
.agentPoolProfiles(Map.ofEntries(
Map.entry("count", 3),
Map.entry("enableNodePublicIP", true),
Map.entry("mode", "System"),
Map.entry("name", "nodepool1"),
Map.entry("osType", "Linux"),
Map.entry("proximityPlacementGroupID", "/subscriptions/subid1/resourcegroups/rg1/providers//Microsoft.Compute/proximityPlacementGroups/ppg1"),
Map.entry("type", "VirtualMachineScaleSets"),
Map.entry("vmSize", "Standard_DS2_v2")
))
.autoScalerProfile(Map.ofEntries(
Map.entry("scaleDownDelayAfterAdd", "15m"),
Map.entry("scanInterval", "20s")
))
.diskEncryptionSetID("/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des")
.dnsPrefix("dnsprefix1")
.enablePodSecurityPolicy(true)
.enableRBAC(true)
.kubernetesVersion("")
.linuxProfile(Map.ofEntries(
Map.entry("adminUsername", "azureuser"),
Map.entry("ssh", Map.of("publicKeys", Map.of("keyData", "keydata")))
))
.location("location1")
.networkProfile(Map.ofEntries(
Map.entry("loadBalancerProfile", Map.of("managedOutboundIPs", Map.of("count", 2))),
Map.entry("loadBalancerSku", "standard"),
Map.entry("outboundType", "loadBalancer")
))
.resourceGroupName("rg1")
.resourceName("clustername1")
.servicePrincipalProfile(Map.ofEntries(
Map.entry("clientId", "clientid"),
Map.entry("secret", "secret")
))
.sku(Map.ofEntries(
Map.entry("name", "Basic"),
Map.entry("tier", "Free")
))
.tags(Map.ofEntries(
Map.entry("archv2", ""),
Map.entry("tier", "production")
))
.windowsProfile(Map.ofEntries(
Map.entry("adminPassword", "replacePassword1234$"),
Map.entry("adminUsername", "azureuser")
))
.build());
}
}

Create Managed Cluster with PodIdentity enabled

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var managedCluster = new AzureNative.ContainerService.ManagedCluster("managedCluster", new()
{
AddonProfiles = null,
AgentPoolProfiles = new[]
{
new AzureNative.ContainerService.Inputs.ManagedClusterAgentPoolProfileArgs
{
Count = 3,
EnableNodePublicIP = true,
Mode = "System",
Name = "nodepool1",
OsType = "Linux",
Type = "VirtualMachineScaleSets",
VmSize = "Standard_DS2_v2",
},
},
AutoScalerProfile = new AzureNative.ContainerService.Inputs.ManagedClusterPropertiesAutoScalerProfileArgs
{
ScaleDownDelayAfterAdd = "15m",
ScanInterval = "20s",
},
DiskEncryptionSetID = "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des",
DnsPrefix = "dnsprefix1",
EnablePodSecurityPolicy = true,
EnableRBAC = true,
KubernetesVersion = "",
LinuxProfile = new AzureNative.ContainerService.Inputs.ContainerServiceLinuxProfileArgs
{
AdminUsername = "azureuser",
Ssh = new AzureNative.ContainerService.Inputs.ContainerServiceSshConfigurationArgs
{
PublicKeys = new[]
{
new AzureNative.ContainerService.Inputs.ContainerServiceSshPublicKeyArgs
{
KeyData = "keydata",
},
},
},
},
Location = "location1",
NetworkProfile = new AzureNative.ContainerService.Inputs.ContainerServiceNetworkProfileArgs
{
LoadBalancerProfile = new AzureNative.ContainerService.Inputs.ManagedClusterLoadBalancerProfileArgs
{
ManagedOutboundIPs = new AzureNative.ContainerService.Inputs.ManagedClusterLoadBalancerProfileManagedOutboundIPsArgs
{
Count = 2,
},
},
LoadBalancerSku = "standard",
OutboundType = "loadBalancer",
},
PodIdentityProfile = new AzureNative.ContainerService.Inputs.ManagedClusterPodIdentityProfileArgs
{
AllowNetworkPluginKubenet = true,
Enabled = true,
},
ResourceGroupName = "rg1",
ResourceName = "clustername1",
ServicePrincipalProfile = new AzureNative.ContainerService.Inputs.ManagedClusterServicePrincipalProfileArgs
{
ClientId = "clientid",
Secret = "secret",
},
Sku = new AzureNative.ContainerService.Inputs.ManagedClusterSKUArgs
{
Name = "Basic",
Tier = "Free",
},
Tags =
{
{ "archv2", "" },
{ "tier", "production" },
},
WindowsProfile = new AzureNative.ContainerService.Inputs.ManagedClusterWindowsProfileArgs
{
AdminPassword = "replacePassword1234$",
AdminUsername = "azureuser",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.containerservice.ManagedCluster;
import com.pulumi.azurenative.containerservice.ManagedClusterArgs;
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 managedCluster = new ManagedCluster("managedCluster", ManagedClusterArgs.builder()
.addonProfiles()
.agentPoolProfiles(Map.ofEntries(
Map.entry("count", 3),
Map.entry("enableNodePublicIP", true),
Map.entry("mode", "System"),
Map.entry("name", "nodepool1"),
Map.entry("osType", "Linux"),
Map.entry("type", "VirtualMachineScaleSets"),
Map.entry("vmSize", "Standard_DS2_v2")
))
.autoScalerProfile(Map.ofEntries(
Map.entry("scaleDownDelayAfterAdd", "15m"),
Map.entry("scanInterval", "20s")
))
.diskEncryptionSetID("/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des")
.dnsPrefix("dnsprefix1")
.enablePodSecurityPolicy(true)
.enableRBAC(true)
.kubernetesVersion("")
.linuxProfile(Map.ofEntries(
Map.entry("adminUsername", "azureuser"),
Map.entry("ssh", Map.of("publicKeys", Map.of("keyData", "keydata")))
))
.location("location1")
.networkProfile(Map.ofEntries(
Map.entry("loadBalancerProfile", Map.of("managedOutboundIPs", Map.of("count", 2))),
Map.entry("loadBalancerSku", "standard"),
Map.entry("outboundType", "loadBalancer")
))
.podIdentityProfile(Map.ofEntries(
Map.entry("allowNetworkPluginKubenet", true),
Map.entry("enabled", true)
))
.resourceGroupName("rg1")
.resourceName("clustername1")
.servicePrincipalProfile(Map.ofEntries(
Map.entry("clientId", "clientid"),
Map.entry("secret", "secret")
))
.sku(Map.ofEntries(
Map.entry("name", "Basic"),
Map.entry("tier", "Free")
))
.tags(Map.ofEntries(
Map.entry("archv2", ""),
Map.entry("tier", "production")
))
.windowsProfile(Map.ofEntries(
Map.entry("adminPassword", "replacePassword1234$"),
Map.entry("adminUsername", "azureuser")
))
.build());
}
}

Create Managed Private Cluster with fqdn subdomain specified

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var managedCluster = new AzureNative.ContainerService.ManagedCluster("managedCluster", new()
{
AddonProfiles = null,
AgentPoolProfiles = new[]
{
new AzureNative.ContainerService.Inputs.ManagedClusterAgentPoolProfileArgs
{
Count = 3,
EnableEncryptionAtHost = true,
EnableNodePublicIP = true,
Mode = "System",
Name = "nodepool1",
OsType = "Linux",
Type = "VirtualMachineScaleSets",
VmSize = "Standard_DS2_v2",
},
},
ApiServerAccessProfile = new AzureNative.ContainerService.Inputs.ManagedClusterAPIServerAccessProfileArgs
{
EnablePrivateCluster = true,
PrivateDNSZone = "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.Network/privateDnsZones/privatelink.location1.azmk8s.io",
},
AutoScalerProfile = new AzureNative.ContainerService.Inputs.ManagedClusterPropertiesAutoScalerProfileArgs
{
ScaleDownDelayAfterAdd = "15m",
ScanInterval = "20s",
},
EnablePodSecurityPolicy = true,
EnableRBAC = true,
FqdnSubdomain = "domain1",
KubernetesVersion = "",
LinuxProfile = new AzureNative.ContainerService.Inputs.ContainerServiceLinuxProfileArgs
{
AdminUsername = "azureuser",
Ssh = new AzureNative.ContainerService.Inputs.ContainerServiceSshConfigurationArgs
{
PublicKeys = new[]
{
new AzureNative.ContainerService.Inputs.ContainerServiceSshPublicKeyArgs
{
KeyData = "keydata",
},
},
},
},
Location = "location1",
NetworkProfile = new AzureNative.ContainerService.Inputs.ContainerServiceNetworkProfileArgs
{
LoadBalancerProfile = new AzureNative.ContainerService.Inputs.ManagedClusterLoadBalancerProfileArgs
{
ManagedOutboundIPs = new AzureNative.ContainerService.Inputs.ManagedClusterLoadBalancerProfileManagedOutboundIPsArgs
{
Count = 2,
},
},
LoadBalancerSku = "standard",
OutboundType = "loadBalancer",
},
ResourceGroupName = "rg1",
ResourceName = "clustername1",
ServicePrincipalProfile = new AzureNative.ContainerService.Inputs.ManagedClusterServicePrincipalProfileArgs
{
ClientId = "clientid",
Secret = "secret",
},
Sku = new AzureNative.ContainerService.Inputs.ManagedClusterSKUArgs
{
Name = "Basic",
Tier = "Free",
},
Tags =
{
{ "archv2", "" },
{ "tier", "production" },
},
WindowsProfile = new AzureNative.ContainerService.Inputs.ManagedClusterWindowsProfileArgs
{
AdminPassword = "replacePassword1234$",
AdminUsername = "azureuser",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.containerservice.ManagedCluster;
import com.pulumi.azurenative.containerservice.ManagedClusterArgs;
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 managedCluster = new ManagedCluster("managedCluster", ManagedClusterArgs.builder()
.addonProfiles()
.agentPoolProfiles(Map.ofEntries(
Map.entry("count", 3),
Map.entry("enableEncryptionAtHost", true),
Map.entry("enableNodePublicIP", true),
Map.entry("mode", "System"),
Map.entry("name", "nodepool1"),
Map.entry("osType", "Linux"),
Map.entry("type", "VirtualMachineScaleSets"),
Map.entry("vmSize", "Standard_DS2_v2")
))
.apiServerAccessProfile(Map.ofEntries(
Map.entry("enablePrivateCluster", true),
Map.entry("privateDNSZone", "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.Network/privateDnsZones/privatelink.location1.azmk8s.io")
))
.autoScalerProfile(Map.ofEntries(
Map.entry("scaleDownDelayAfterAdd", "15m"),
Map.entry("scanInterval", "20s")
))
.enablePodSecurityPolicy(true)
.enableRBAC(true)
.fqdnSubdomain("domain1")
.kubernetesVersion("")
.linuxProfile(Map.ofEntries(
Map.entry("adminUsername", "azureuser"),
Map.entry("ssh", Map.of("publicKeys", Map.of("keyData", "keydata")))
))
.location("location1")
.networkProfile(Map.ofEntries(
Map.entry("loadBalancerProfile", Map.of("managedOutboundIPs", Map.of("count", 2))),
Map.entry("loadBalancerSku", "standard"),
Map.entry("outboundType", "loadBalancer")
))
.resourceGroupName("rg1")
.resourceName("clustername1")
.servicePrincipalProfile(Map.ofEntries(
Map.entry("clientId", "clientid"),
Map.entry("secret", "secret")
))
.sku(Map.ofEntries(
Map.entry("name", "Basic"),
Map.entry("tier", "Free")
))
.tags(Map.ofEntries(
Map.entry("archv2", ""),
Map.entry("tier", "production")
))
.windowsProfile(Map.ofEntries(
Map.entry("adminPassword", "replacePassword1234$"),
Map.entry("adminUsername", "azureuser")
))
.build());
}
}

Create/Update AAD Managed Cluster with EnableAzureRBAC

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var managedCluster = new AzureNative.ContainerService.ManagedCluster("managedCluster", new()
{
AadProfile = new AzureNative.ContainerService.Inputs.ManagedClusterAADProfileArgs
{
EnableAzureRBAC = true,
Managed = true,
},
AddonProfiles = null,
AgentPoolProfiles = new[]
{
new AzureNative.ContainerService.Inputs.ManagedClusterAgentPoolProfileArgs
{
AvailabilityZones = new[]
{
"1",
"2",
"3",
},
Count = 3,
EnableNodePublicIP = true,
Mode = "System",
Name = "nodepool1",
OsType = "Linux",
Type = "VirtualMachineScaleSets",
VmSize = "Standard_DS1_v2",
},
},
AutoScalerProfile = new AzureNative.ContainerService.Inputs.ManagedClusterPropertiesAutoScalerProfileArgs
{
ScaleDownDelayAfterAdd = "15m",
ScanInterval = "20s",
},
DiskEncryptionSetID = "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des",
DnsPrefix = "dnsprefix1",
EnablePodSecurityPolicy = true,
EnableRBAC = true,
KubernetesVersion = "",
LinuxProfile = new AzureNative.ContainerService.Inputs.ContainerServiceLinuxProfileArgs
{
AdminUsername = "azureuser",
Ssh = new AzureNative.ContainerService.Inputs.ContainerServiceSshConfigurationArgs
{
PublicKeys = new[]
{
new AzureNative.ContainerService.Inputs.ContainerServiceSshPublicKeyArgs
{
KeyData = "keydata",
},
},
},
},
Location = "location1",
NetworkProfile = new AzureNative.ContainerService.Inputs.ContainerServiceNetworkProfileArgs
{
LoadBalancerProfile = new AzureNative.ContainerService.Inputs.ManagedClusterLoadBalancerProfileArgs
{
ManagedOutboundIPs = new AzureNative.ContainerService.Inputs.ManagedClusterLoadBalancerProfileManagedOutboundIPsArgs
{
Count = 2,
},
},
LoadBalancerSku = "standard",
OutboundType = "loadBalancer",
},
ResourceGroupName = "rg1",
ResourceName = "clustername1",
ServicePrincipalProfile = new AzureNative.ContainerService.Inputs.ManagedClusterServicePrincipalProfileArgs
{
ClientId = "clientid",
Secret = "secret",
},
Sku = new AzureNative.ContainerService.Inputs.ManagedClusterSKUArgs
{
Name = "Basic",
Tier = "Free",
},
Tags =
{
{ "archv2", "" },
{ "tier", "production" },
},
WindowsProfile = new AzureNative.ContainerService.Inputs.ManagedClusterWindowsProfileArgs
{
AdminPassword = "replacePassword1234$",
AdminUsername = "azureuser",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.containerservice.ManagedCluster;
import com.pulumi.azurenative.containerservice.ManagedClusterArgs;
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 managedCluster = new ManagedCluster("managedCluster", ManagedClusterArgs.builder()
.aadProfile(Map.ofEntries(
Map.entry("enableAzureRBAC", true),
Map.entry("managed", true)
))
.addonProfiles()
.agentPoolProfiles(Map.ofEntries(
Map.entry("availabilityZones",
"1",
"2",
"3"),
Map.entry("count", 3),
Map.entry("enableNodePublicIP", true),
Map.entry("mode", "System"),
Map.entry("name", "nodepool1"),
Map.entry("osType", "Linux"),
Map.entry("type", "VirtualMachineScaleSets"),
Map.entry("vmSize", "Standard_DS1_v2")
))
.autoScalerProfile(Map.ofEntries(
Map.entry("scaleDownDelayAfterAdd", "15m"),
Map.entry("scanInterval", "20s")
))
.diskEncryptionSetID("/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des")
.dnsPrefix("dnsprefix1")
.enablePodSecurityPolicy(true)
.enableRBAC(true)
.kubernetesVersion("")
.linuxProfile(Map.ofEntries(
Map.entry("adminUsername", "azureuser"),
Map.entry("ssh", Map.of("publicKeys", Map.of("keyData", "keydata")))
))
.location("location1")
.networkProfile(Map.ofEntries(
Map.entry("loadBalancerProfile", Map.of("managedOutboundIPs", Map.of("count", 2))),
Map.entry("loadBalancerSku", "standard"),
Map.entry("outboundType", "loadBalancer")
))
.resourceGroupName("rg1")
.resourceName("clustername1")
.servicePrincipalProfile(Map.ofEntries(
Map.entry("clientId", "clientid"),
Map.entry("secret", "secret")
))
.sku(Map.ofEntries(
Map.entry("name", "Basic"),
Map.entry("tier", "Free")
))
.tags(Map.ofEntries(
Map.entry("archv2", ""),
Map.entry("tier", "production")
))
.windowsProfile(Map.ofEntries(
Map.entry("adminPassword", "replacePassword1234$"),
Map.entry("adminUsername", "azureuser")
))
.build());
}
}

Create/Update Managed Cluster

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var managedCluster = new AzureNative.ContainerService.ManagedCluster("managedCluster", new()
{
AddonProfiles = null,
AgentPoolProfiles = new[]
{
new AzureNative.ContainerService.Inputs.ManagedClusterAgentPoolProfileArgs
{
AvailabilityZones = new[]
{
"1",
"2",
"3",
},
Count = 3,
EnableNodePublicIP = true,
Mode = "System",
Name = "nodepool1",
OsType = "Linux",
Type = "VirtualMachineScaleSets",
VmSize = "Standard_DS1_v2",
},
},
AutoScalerProfile = new AzureNative.ContainerService.Inputs.ManagedClusterPropertiesAutoScalerProfileArgs
{
BalanceSimilarNodeGroups = "true",
Expander = "priority",
MaxNodeProvisionTime = "15m",
NewPodScaleUpDelay = "1m",
ScaleDownDelayAfterAdd = "15m",
ScanInterval = "20s",
SkipNodesWithSystemPods = "false",
},
DiskEncryptionSetID = "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des",
DnsPrefix = "dnsprefix1",
EnablePodSecurityPolicy = true,
EnableRBAC = true,
Identity = new AzureNative.ContainerService.Inputs.ManagedClusterIdentityArgs
{
Type = AzureNative.ContainerService.ResourceIdentityType.UserAssigned,
UserAssignedIdentities =
{
{ "/subscriptions/subid1/resourceGroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1", null },
},
},
KubernetesVersion = "",
LinuxProfile = new AzureNative.ContainerService.Inputs.ContainerServiceLinuxProfileArgs
{
AdminUsername = "azureuser",
Ssh = new AzureNative.ContainerService.Inputs.ContainerServiceSshConfigurationArgs
{
PublicKeys = new[]
{
new AzureNative.ContainerService.Inputs.ContainerServiceSshPublicKeyArgs
{
KeyData = "keydata",
},
},
},
},
Location = "location1",
NetworkProfile = new AzureNative.ContainerService.Inputs.ContainerServiceNetworkProfileArgs
{
LoadBalancerProfile = new AzureNative.ContainerService.Inputs.ManagedClusterLoadBalancerProfileArgs
{
ManagedOutboundIPs = new AzureNative.ContainerService.Inputs.ManagedClusterLoadBalancerProfileManagedOutboundIPsArgs
{
Count = 2,
},
},
LoadBalancerSku = "standard",
OutboundType = "loadBalancer",
},
ResourceGroupName = "rg1",
ResourceName = "clustername1",
ServicePrincipalProfile = new AzureNative.ContainerService.Inputs.ManagedClusterServicePrincipalProfileArgs
{
ClientId = "clientid",
Secret = "secret",
},
Sku = new AzureNative.ContainerService.Inputs.ManagedClusterSKUArgs
{
Name = "Basic",
Tier = "Free",
},
Tags =
{
{ "archv2", "" },
{ "tier", "production" },
},
WindowsProfile = new AzureNative.ContainerService.Inputs.ManagedClusterWindowsProfileArgs
{
AdminPassword = "replacePassword1234$",
AdminUsername = "azureuser",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.containerservice.ManagedCluster;
import com.pulumi.azurenative.containerservice.ManagedClusterArgs;
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 managedCluster = new ManagedCluster("managedCluster", ManagedClusterArgs.builder()
.addonProfiles()
.agentPoolProfiles(Map.ofEntries(
Map.entry("availabilityZones",
"1",
"2",
"3"),
Map.entry("count", 3),
Map.entry("enableNodePublicIP", true),
Map.entry("mode", "System"),
Map.entry("name", "nodepool1"),
Map.entry("osType", "Linux"),
Map.entry("type", "VirtualMachineScaleSets"),
Map.entry("vmSize", "Standard_DS1_v2")
))
.autoScalerProfile(Map.ofEntries(
Map.entry("balanceSimilarNodeGroups", "true"),
Map.entry("expander", "priority"),
Map.entry("maxNodeProvisionTime", "15m"),
Map.entry("newPodScaleUpDelay", "1m"),
Map.entry("scaleDownDelayAfterAdd", "15m"),
Map.entry("scanInterval", "20s"),
Map.entry("skipNodesWithSystemPods", "false")
))
.diskEncryptionSetID("/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des")
.dnsPrefix("dnsprefix1")
.enablePodSecurityPolicy(true)
.enableRBAC(true)
.identity(Map.ofEntries(
Map.entry("type", "UserAssigned"),
Map.entry("userAssignedIdentities", Map.of("/subscriptions/subid1/resourceGroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1", ))
))
.kubernetesVersion("")
.linuxProfile(Map.ofEntries(
Map.entry("adminUsername", "azureuser"),
Map.entry("ssh", Map.of("publicKeys", Map.of("keyData", "keydata")))
))
.location("location1")
.networkProfile(Map.ofEntries(
Map.entry("loadBalancerProfile", Map.of("managedOutboundIPs", Map.of("count", 2))),
Map.entry("loadBalancerSku", "standard"),
Map.entry("outboundType", "loadBalancer")
))
.resourceGroupName("rg1")
.resourceName("clustername1")
.servicePrincipalProfile(Map.ofEntries(
Map.entry("clientId", "clientid"),
Map.entry("secret", "secret")
))
.sku(Map.ofEntries(
Map.entry("name", "Basic"),
Map.entry("tier", "Free")
))
.tags(Map.ofEntries(
Map.entry("archv2", ""),
Map.entry("tier", "production")
))
.windowsProfile(Map.ofEntries(
Map.entry("adminPassword", "replacePassword1234$"),
Map.entry("adminUsername", "azureuser")
))
.build());
}
}

Create/Update Managed Cluster with EnableAHUB

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var managedCluster = new AzureNative.ContainerService.ManagedCluster("managedCluster", new()
{
AddonProfiles = null,
AgentPoolProfiles = new[]
{
new AzureNative.ContainerService.Inputs.ManagedClusterAgentPoolProfileArgs
{
AvailabilityZones = new[]
{
"1",
"2",
"3",
},
Count = 3,
EnableNodePublicIP = true,
Mode = "System",
Name = "nodepool1",
OsType = "Linux",
Type = "VirtualMachineScaleSets",
VmSize = "Standard_DS1_v2",
},
},
AutoScalerProfile = new AzureNative.ContainerService.Inputs.ManagedClusterPropertiesAutoScalerProfileArgs
{
ScaleDownDelayAfterAdd = "15m",
ScanInterval = "20s",
},
DiskEncryptionSetID = "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des",
DnsPrefix = "dnsprefix1",
EnablePodSecurityPolicy = true,
EnableRBAC = true,
Identity = new AzureNative.ContainerService.Inputs.ManagedClusterIdentityArgs
{
Type = AzureNative.ContainerService.ResourceIdentityType.UserAssigned,
UserAssignedIdentities =
{
{ "/subscriptions/subid1/resourceGroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1", null },
},
},
KubernetesVersion = "",
LinuxProfile = new AzureNative.ContainerService.Inputs.ContainerServiceLinuxProfileArgs
{
AdminUsername = "azureuser",
Ssh = new AzureNative.ContainerService.Inputs.ContainerServiceSshConfigurationArgs
{
PublicKeys = new[]
{
new AzureNative.ContainerService.Inputs.ContainerServiceSshPublicKeyArgs
{
KeyData = "keydata",
},
},
},
},
Location = "location1",
NetworkProfile = new AzureNative.ContainerService.Inputs.ContainerServiceNetworkProfileArgs
{
LoadBalancerProfile = new AzureNative.ContainerService.Inputs.ManagedClusterLoadBalancerProfileArgs
{
ManagedOutboundIPs = new AzureNative.ContainerService.Inputs.ManagedClusterLoadBalancerProfileManagedOutboundIPsArgs
{
Count = 2,
},
},
LoadBalancerSku = "standard",
OutboundType = "loadBalancer",
},
ResourceGroupName = "rg1",
ResourceName = "clustername1",
ServicePrincipalProfile = new AzureNative.ContainerService.Inputs.ManagedClusterServicePrincipalProfileArgs
{
ClientId = "clientid",
Secret = "secret",
},
Sku = new AzureNative.ContainerService.Inputs.ManagedClusterSKUArgs
{
Name = "Basic",
Tier = "Free",
},
Tags =
{
{ "archv2", "" },
{ "tier", "production" },
},
WindowsProfile = new AzureNative.ContainerService.Inputs.ManagedClusterWindowsProfileArgs
{
AdminPassword = "replacePassword1234$",
AdminUsername = "azureuser",
LicenseType = "Windows_Server",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.containerservice.ManagedCluster;
import com.pulumi.azurenative.containerservice.ManagedClusterArgs;
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 managedCluster = new ManagedCluster("managedCluster", ManagedClusterArgs.builder()
.addonProfiles()
.agentPoolProfiles(Map.ofEntries(
Map.entry("availabilityZones",
"1",
"2",
"3"),
Map.entry("count", 3),
Map.entry("enableNodePublicIP", true),
Map.entry("mode", "System"),
Map.entry("name", "nodepool1"),
Map.entry("osType", "Linux"),
Map.entry("type", "VirtualMachineScaleSets"),
Map.entry("vmSize", "Standard_DS1_v2")
))
.autoScalerProfile(Map.ofEntries(
Map.entry("scaleDownDelayAfterAdd", "15m"),
Map.entry("scanInterval", "20s")
))
.diskEncryptionSetID("/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des")
.dnsPrefix("dnsprefix1")
.enablePodSecurityPolicy(true)
.enableRBAC(true)
.identity(Map.ofEntries(
Map.entry("type", "UserAssigned"),
Map.entry("userAssignedIdentities", Map.of("/subscriptions/subid1/resourceGroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1", ))
))
.kubernetesVersion("")
.linuxProfile(Map.ofEntries(
Map.entry("adminUsername", "azureuser"),
Map.entry("ssh", Map.of("publicKeys", Map.of("keyData", "keydata")))
))
.location("location1")
.networkProfile(Map.ofEntries(
Map.entry("loadBalancerProfile", Map.of("managedOutboundIPs", Map.of("count", 2))),
Map.entry("loadBalancerSku", "standard"),
Map.entry("outboundType", "loadBalancer")
))
.resourceGroupName("rg1")
.resourceName("clustername1")
.servicePrincipalProfile(Map.ofEntries(
Map.entry("clientId", "clientid"),
Map.entry("secret", "secret")
))
.sku(Map.ofEntries(
Map.entry("name", "Basic"),
Map.entry("tier", "Free")
))
.tags(Map.ofEntries(
Map.entry("archv2", ""),
Map.entry("tier", "production")
))
.windowsProfile(Map.ofEntries(
Map.entry("adminPassword", "replacePassword1234$"),
Map.entry("adminUsername", "azureuser"),
Map.entry("licenseType", "Windows_Server")
))
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:containerservice:ManagedCluster clustername1 /subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1

Properties

Link copied to clipboard

Profile of Azure Active Directory configuration.

Link copied to clipboard

Profile of managed cluster add-on.

Link copied to clipboard

Properties of the agent pool.

Link copied to clipboard

Access profile for managed cluster API server.

Link copied to clipboard

Parameters to be applied to the cluster-autoscaler when enabled

Link copied to clipboard

Profile of auto upgrade configuration.

Link copied to clipboard
val azurePortalFQDN: Output<String>

FQDN for the master pool which used by proxy config.

Link copied to clipboard

If set to true, getting static credential will be disabled for this cluster. Expected to only be used for AAD clusters.

Link copied to clipboard

ResourceId of the disk encryption set to use for enabling encryption at rest.

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

DNS prefix specified when creating the managed cluster.

Link copied to clipboard

(DEPRECATING) Whether to enable Kubernetes pod security policy (preview). This feature is set for removal on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy.

Link copied to clipboard
val enableRBAC: Output<Boolean>?

Whether to enable Kubernetes Role-Based Access Control.

Link copied to clipboard

The extended location of the Virtual Machine.

Link copied to clipboard
val fqdn: Output<String>

FQDN for the master pool.

Link copied to clipboard
val fqdnSubdomain: Output<String>?

FQDN subdomain specified when creating private cluster with custom private dns zone.

Link copied to clipboard

Configurations for provisioning the cluster with HTTP proxy servers.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

The identity of the managed cluster, if configured.

Link copied to clipboard

Identities associated with the cluster.

Link copied to clipboard

Version of Kubernetes specified when creating the managed cluster.

Link copied to clipboard

Profile for Linux VMs in the container service cluster.

Link copied to clipboard
val location: Output<String>

Resource location

Link copied to clipboard
val maxAgentPools: Output<Int>

The max number of agent pools for the managed cluster.

Link copied to clipboard
val name: Output<String>

Resource name

Link copied to clipboard

Profile of network configuration.

Link copied to clipboard

Name of the resource group containing agent pool nodes.

Link copied to clipboard

Profile of managed cluster pod identity.

Link copied to clipboard

Represents the Power State of the cluster

Link copied to clipboard
val privateFQDN: Output<String>

FQDN of private cluster.

Link copied to clipboard

Private link resources associated with the cluster.

Link copied to clipboard

The current deployment or provisioning state, which only appears in the response.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Information about a service principal identity for the cluster to use for manipulating Azure APIs.

Link copied to clipboard

The managed cluster SKU.

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

Resource tags

Link copied to clipboard
val type: Output<String>

Resource type

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard

Profile for Windows VMs in the container service cluster.