Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "parameters": {
- "subnetKubernetes": {
- "type": "string"
- },
- "workspaceResourceId": {
- "type": "string"
- },
- "aksClusterName": {
- "type": "string"
- },
- "ServicePrincipal": {
- "type": "string",
- "metadata": {
- "description": "Application ID/Client ID of the service principal. Used by AKS to manage AKS related resources on Azure like vms, subnets."
- }
- },
- "clientSecret": {
- "type": "string",
- "metadata": {
- "description": "Secret of the service principal. Used by AKS to manage Azure."
- }
- },
- "clientAppID": {
- "type": "string",
- "metadata": {
- "description": "clientAppID used for RBAC with Azure AD"
- }
- },
- "serverAppID": {
- "type": "string",
- "metadata": {
- "description": "serverAppID used for RBAC with Azure AD"
- }
- },
- "serverAppSecret": {
- "type": "string",
- "metadata": {
- "description": "serverAppSecret used for RBAC with Azure AD"
- }
- },
- "tenantID": {
- "type": "string",
- "metadata": {
- "description": "tenantID"
- }
- },
- "virtualNetworkAddressPrefix": {
- "defaultValue": "10.0.0.0/8",
- "type": "string",
- "metadata": {
- "description": "Containers DNS server IP address."
- }
- },
- "SubnetAddressPrefix": {
- "defaultValue": "10.0.0.0/16",
- "type": "string",
- "metadata": {
- "description": "Containers DNS server IP address."
- }
- },
- "DnsPrefix": {
- "defaultValue": "aks",
- "type": "string",
- "metadata": {
- "description": "Optional DNS prefix to use with hosted Kubernetes API server FQDN."
- }
- },
- "AgentOsDiskSizeGB": {
- "defaultValue": 40,
- "minValue": 30,
- "maxValue": 1023,
- "type": "int",
- "metadata": {
- "description": "Disk size (in GB) to provision for each of the agent pool nodes. This value ranges from 30 to 1023."
- }
- },
- "AgentCount": {
- "defaultValue": 5,
- "minValue": 1,
- "maxValue": 50,
- "type": "int",
- "metadata": {
- "description": "The number of agent nodes for the cluster."
- }
- },
- "AgentVMSize": {
- "defaultValue": "Standard_E2s_v3",
- "allowedValues": [
- "Standard_DS2",
- "Standard_DS2_v2",
- "Standard_DS2_v2_Promo",
- "Standard_DS3",
- "Standard_DS3_v2",
- "Standard_DS3_v2_Promo",
- "Standard_DS4",
- "Standard_DS4_v2",
- "Standard_DS4_v2_Promo",
- "Standard_E2s_v3",
- "Standard_E4s_v3"
- ],
- "type": "string",
- "metadata": {
- "description": "The size of the Virtual Machine."
- }
- },
- "kubernetesVersion": {
- "defaultValue": "1.13.5",
- "type": "string",
- "metadata": {
- "description": "The version of Kubernetes."
- }
- },
- "ServiceCIDR": {
- "defaultValue": "10.2.0.0/16",
- "type": "string",
- "metadata": {
- "description": "A CIDR notation IP range from which to assign service cluster IPs."
- }
- },
- "DnsServiceIP": {
- "defaultValue": "10.2.0.10",
- "type": "string",
- "metadata": {
- "description": "Containers DNS server IP address."
- }
- },
- "DockerBridgeCIDR": {
- "defaultValue": "172.17.0.1/16",
- "type": "string",
- "metadata": {
- "description": "A CIDR notation IP for Docker bridge."
- }
- },
- "EnableRBAC": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Enable RBAC on the AKS cluster."
- }
- }
- },
- "resources": [
- {
- "type": "Microsoft.ContainerService/managedClusters",
- "name": "[parameters('aksClusterName')]",
- "apiVersion": "2019-06-01",
- "location": "[resourceGroup().location]",
- "properties": {
- "kubernetesVersion": "[parameters('kubernetesVersion')]",
- "enableRBAC": "[parameters('EnableRBAC')]",
- "dnsPrefix": "[parameters('DnsPrefix')]",
- "addonProfiles": {
- "httpApplicationRouting": {
- "enabled": false
- },
- "omsagent": {
- "enabled": true,
- "config": {
- "logAnalyticsWorkspaceResourceID": "[parameters('workspaceResourceId')]"
- }
- }
- },
- "agentPoolProfiles": [
- {
- "name": "agentpool",
- "osDiskSizeGB": "[parameters('AgentOsDiskSizeGB')]",
- "count": "[parameters('AgentCount')]",
- "vmSize": "[parameters('AgentVMSize')]",
- "osType": "Linux",
- "storageProfile": "ManagedDisks",
- "vnetSubnetID": "[parameters('subnetKubernetes')]",
- "dnsPrefix": "agents",
- "minCount": 5,
- "maxCount": 8,
- "enableAutoScaling": true,
- "type": "VirtualMachineScaleSets",
- "availabilityZones": [
- "1",
- "2",
- "3"
- ]
- }
- ],
- "aadProfile": {
- "clientAppID": "[parameters('clientAppID')]",
- "serverAppID": "[parameters('serverAppID')]",
- "serverAppSecret": "[parameters('serverAppSecret')]",
- "tenantID": "[parameters('tenantID')]"
- },
- "servicePrincipalProfile": {
- "clientId": "[parameters('ServicePrincipal')]",
- "secret": "[parameters('clientSecret')]"
- },
- "networkProfile": {
- "networkPlugin": "azure",
- "networkPolicy": "calico",
- "serviceCidr": "[parameters('ServiceCIDR')]",
- "dnsServiceIP": "[parameters('DnsServiceIP')]",
- "dockerBridgeCidr": "[parameters('DockerBridgeCIDR')]",
- "loadBalancerSku": "standard"
- }
- }
- }
- ]
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement