Last active
March 4, 2019 15:09
-
-
Save gbaeke/0251cca2b5a6e5342a00ff9139b12a06 to your computer and use it in GitHub Desktop.
Azure AKS Deployment (for Xylos Blog)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"serverAppID": { | |
"type": "string", | |
"metadata": { | |
"description": "ID of the server app registration (RBAC)" | |
} | |
}, | |
"serverAppSecret": { | |
"type": "securestring", | |
"metadata": { | |
"description": "secret of the server app registration (RBAC)" | |
} | |
}, | |
"clientAppID": { | |
"type": "string", | |
"metadata": { | |
"description": "ID of the client app registration (RBAC)" | |
} | |
}, | |
"tenantID": { | |
"type": "string", | |
"metadata": { | |
"description": "ID of the AD tenant (RBAC)" | |
} | |
}, | |
"clientId": { | |
"type": "string", | |
"metadata": { | |
"description": "Service Principal Client ID" | |
} | |
}, | |
"clientIdsecret": { | |
"type": "securestring", | |
"metadata": { | |
"description": "Service Principal Client Secret" | |
} | |
}, | |
"clusterName": { | |
"type": "string", | |
"metadata": { | |
"description": "Name of the cluster e.g. prd-oase2-kub" | |
} | |
}, | |
"kubernetesVersion": { | |
"type": "string", | |
"metadata": { | |
"description": "Version number of Kubernetes e.g. 1.8.7" | |
} | |
}, | |
"environment": { | |
"type": "string", | |
"metadata": { | |
"description": "Environment for the cluster e.g. production" | |
} | |
}, | |
"dnsPrefix": { | |
"type": "string", | |
"metadata": { | |
"description": "DNS prefix for the cluster e.g. oaseprd" | |
} | |
}, | |
"poolName": { | |
"type": "string", | |
"metadata": { | |
"description": "Name of server pool for the cluster e.g. oaseprdpool" | |
} | |
}, | |
"nodeCount": { | |
"type": "int", | |
"metadata": { | |
"description": "Number of nodes" | |
} | |
} | |
}, | |
"variables": {}, | |
"resources": [ | |
{ | |
"type": "Microsoft.OperationalInsights/workspaces", | |
"name": "[parameters('clusterName')]", | |
"apiVersion": "2017-03-15-preview", | |
"location": "[resourceGroup().location]", | |
"properties": { | |
"sku": { | |
"Name": "Standalone" | |
}, | |
"features": { | |
"searchVersion": 1 | |
} | |
}, | |
"resources": [ | |
{ | |
"name": "[concat('ContainerInsights', '(',parameters('clusterName'),')')]", | |
"type": "Microsoft.OperationsManagement/solutions", | |
"apiVersion": "2015-11-01-preview", | |
"location": "[resourceGroup().location]", | |
"dependsOn": [ | |
"[concat('Microsoft.OperationalInsights/workspaces/', parameters('clusterName'))]" | |
], | |
"plan": { | |
"name": "[concat('ContainerInsights', '(',parameters('clusterName'),')')]", | |
"product": "[concat('OMSGallery/', 'ContainerInsights')]", | |
"publisher": "Microsoft", | |
"promotionCode": "" | |
}, | |
"properties": { | |
"workspaceResourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/',parameters('clusterName'))]" | |
} | |
} | |
] | |
}, | |
{ | |
"name": "[parameters('clusterName')]", | |
"type": "Microsoft.ContainerService/managedClusters", | |
"apiVersion": "2018-03-31", | |
"location": "westeurope", | |
"tags": { | |
"environment": "[parameters('environment')]" | |
}, | |
"dependsOn": [ | |
"[concat('Microsoft.OperationalInsights/workspaces/', parameters('clusterName'))]" | |
], | |
"properties": { | |
"kubernetesVersion": "[parameters('kubernetesVersion')]", | |
"dnsPrefix": "[parameters('dnsPrefix')]", | |
"agentPoolProfiles": [ | |
{ | |
"name": "[parameters('poolName')]", | |
"count": "[parameters('nodeCount')]", | |
"vmSize": "Standard_DS3_v2", | |
"dnsPrefix": "[parameters('poolName')]" | |
} | |
], | |
"linuxProfile": { | |
"adminUsername": "oaseadmin", | |
"ssh": { | |
"publicKeys": [ | |
{ | |
"keyData": "ssh-rsa KEY" | |
} | |
] | |
} | |
}, | |
"servicePrincipalProfile": { | |
"clientId": "[parameters('clientId')]", | |
"secret": "[parameters('clientIdsecret')]" | |
}, | |
"addonProfiles": { | |
"omsagent": { | |
"enabled": true, | |
"config": { | |
"logAnalyticsWorkspaceResourceID": "[resourceId('Microsoft.OperationalInsights/workspaces/',parameters('clusterName'))]" | |
} | |
} | |
}, | |
"enableRBAC": true, | |
"networkProfile": { | |
"networkPlugin": "kubenet" | |
}, | |
"aadProfile": { | |
"clientAppID": "[parameters('clientAppID')]", | |
"serverAppID": "[parameters('serverAppID')]", | |
"serverAppSecret": "[parameters('serverAppSecret')]", | |
"tenantID": "[parameters('tenantID')]" | |
} | |
} | |
} | |
], | |
"outputs": {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment