service_principal_id=sp.id, end_date="2099-01-01T00:00:00Z", value=PASSWORD, ) aks = KubernetesCluster( "aksCluster", location=resource_group.location, resource_group_name=resource_group.name, kubernetes_version="1.14.6", dns_prefix="dns", linux_profile={ "adminUsername": "******", "ssh_key": { "keyData": SSHKEY } }, service_principal={ "client_id": app.application_id, "client_secret": sppwd.value }, agent_pool_profiles=[{ "name": "type1", "count": 2, "vmSize": "Standard_B2ms", }], ) k8s_provider = Provider( "k8s", kubeconfig=aks.kube_config_raw, )
aks = KubernetesCluster( "aks", name=PREFIX + "aks", location=resource_group.location, resource_group_name=resource_group.name, kubernetes_version="1.13.5", dns_prefix="dns", agent_pool_profiles=[{ "name": "type1", "count": 2, "vmSize": "Standard_B2ms", "osType": "Linux", "maxPods": 110, "vnet_subnet_id": subnet.id, }], linux_profile={ "adminUsername": "******", "ssh_key": { "keyData": SSHKEY } }, service_principal={ "clientId": app.application_id, "clientSecret": sppwd.value }, role_based_access_control={"enabled": "true"}, network_profile={ "networkPlugin": "azure", "serviceCidr": "10.10.0.0/16", "dns_service_ip": "10.10.0.10", "dockerBridgeCidr": "172.17.0.1/16", }, __opts__=ResourceOptions(parent=resource_group, depends_on=[acr_assignment, subnet_assignment]), )
aks = KubernetesCluster( 'aks', name='kzhou-aks', location=rg.location, resource_group_name=rg.name, kubernetes_version="1.19.3", dns_prefix="dns", default_node_pool=({ "name": "type1", "node_count": 2, "vm_size": "Standard_B2ms", "max_pods": 110, "vnet_subnet_id": subnet.id }), linux_profile=({ "adminUsername": "******", "ssh_key": { "keyData": SSHKEY } }), service_principal={ "clientId": app.application_id, "clientSecret": sppwd.value }, role_based_access_control={"enabled": "true"}, network_profile=({ "networkPlugin": "azure", "serviceCidr": "10.10.0.0/16", "dns_service_ip": "10.10.0.10", "dockerBridgeCidr": "172.17.0.1/16" }), __opts__=ResourceOptions(depends_on=[acr_assignment, subnet_assignment]))
aks = KubernetesCluster( "aks", name=PREFIX + "aks", resource_group_name=resource_group.name, kubernetes_version="1.15.5", dns_prefix="dns", agent_pool_profiles=[{ "name": "type1", "count": 2, "enableAutoScaling": True, "maxPods": 110, "min_count": 2, "max_count": 4, "osType": "Linux", "type": "VirtualMachineScaleSets", "vmSize": VMSIZE, "vnet_subnet_id": subnet.id, }], linux_profile={ "adminUsername": "******", "ssh_key": { "keyData": SSHKEY } }, service_principal={ "clientId": app.application_id, "clientSecret": sppwd.value }, role_based_access_control={"enabled": "false"}, network_profile={ "networkPlugin": "azure", "serviceCidr": AKSSERVICECIDR, "dns_service_ip": DNSSERVICEIP, "dockerBridgeCidr": "172.17.0.1/16", }, __opts__=ResourceOptions(parent=resource_group, depends_on=[acr_assignment, subnet_assignment]), )
# create service principal password sppwd = ServicePrincipalPassword( "aks-app-sp-pwd", service_principal_id=sp.id, end_date="2099-01-01T00:00:00Z", value=PASSWORD, ) aks = KubernetesCluster( "aksCluster", resource_group_name=resource_group.name, kubernetes_version="1.18.6", dns_prefix="dns", linux_profile=KubernetesClusterLinuxProfileArgs( admin_username="******", ssh_key=KubernetesClusterLinuxProfileSshKeyArgs(key_data=SSHKEY)), service_principal=KubernetesClusterServicePrincipalArgs( client_id=app.application_id, client_secret=sppwd.value), default_node_pool=KubernetesClusterDefaultNodePoolArgs( name="type1", node_count=2, vm_size="Standard_B2ms", ), ) k8s_provider = Provider( "k8s", kubeconfig=aks.kube_config_raw, ) labels = {"app": "nginx"} nginx = Deployment(
# create service principal password sppwd = ServicePrincipalPassword( "miw-aks-app-sp-pwd", service_principal_id=sp.id, end_date="2099-01-01T00:00:00Z", value=PASSWORD, ) aks = KubernetesCluster( "miw-aksCluster", resource_group_name=resource_group.name, kubernetes_version="1.16.13", dns_prefix="dns", linux_profile={ "adminUsername": "******", "ssh_key": { "keyData": SSHKEY } }, service_principal={ "client_id": app.application_id, "client_secret": sppwd.value }, default_node_pool={ "name": "type1", "node_count": 2, "vm_size": "Standard_B2ms", }, )