зеркало из https://github.com/Azure/acs-engine.git
Update IP layout for Kubernetes Windows agents to be Dynamic & allow multiple Windows agent pools (#292)
* Update IP layout of K8s Windows agents to be Dynamics & allow multiple Windows agent pools
This commit is contained in:
Родитель
4b656a7263
Коммит
73137ba121
|
@ -2,10 +2,10 @@
|
|||
|
||||
## Overview
|
||||
|
||||
The Azure Container Service Engine (`acs-engine`) generates ARM (Azure Resource Manager) templates for Docker enabled clusters on Microsoft Azure with your choice of DC/OS, Kubernetes, or Swarm orchestrators. The input to the tool is a cluster definition. The cluster definition is very similar to (in many cases the same as) the ARM template syntax used to deploy a Microsoft Azure Container Service cluster.
|
||||
The Azure Container Service Engine (`acs-engine`) generates ARM (Azure Resource Manager) templates for Docker enabled clusters on Microsoft Azure with your choice of DC/OS, Kubernetes, Swarm Mode, or Swarm orchestrators. The input to the tool is a cluster definition. The cluster definition is very similar to (in many cases the same as) the ARM template syntax used to deploy a Microsoft Azure Container Service cluster.
|
||||
|
||||
The cluster definition file enables the following customizations to your Docker enabled cluster:
|
||||
* choice of DC/OS, Kubernetes, or Swarm orchestrators
|
||||
* choice of DC/OS, Kubernetes, Swarm Mode, or Swarm orchestrators
|
||||
* multiple agent pools where each agent pool can specify:
|
||||
* standard or premium VM Sizes,
|
||||
* node count,
|
||||
|
|
|
@ -12,6 +12,35 @@ Here are the steps to deploy a simple Kubernetes cluster:
|
|||
4. edit the [Kubernetes example](../examples/kubernetes.json) and fill in the blank strings
|
||||
5. [generate the template](acsengine.md#generating-a-template)
|
||||
6. [deploy the output azuredeploy.json and azuredeploy.parameters.json](../README.md#deployment-usage)
|
||||
7. Temporary workaround when deploying a cluster in a custom VNET with Kubernetes 1.5.3:
|
||||
1. After a cluster has been created in step 6 get id of the route table resource from Microsoft.Network provider in your resource group.
|
||||
The route table resource id is of the format:
|
||||
`/subscriptions/SUBSCRIPTIONID/resourceGroups/RESOURCEGROUPNAME/providers/Microsoft.Network/routeTables/ROUTETABLENAME`
|
||||
2. Update properties of all subnets in the newly created VNET that are used by Kubernetes cluster to refer to the route table resource by appending the following to subnet properties:
|
||||
```shell
|
||||
"routeTable": {
|
||||
"id": "/subscriptions/<SubscriptionId>/resourceGroups/<ResourceGroupName>/providers/Microsoft.Network/routeTables/<RouteTableResourceName>"
|
||||
}
|
||||
```
|
||||
|
||||
E.g.:
|
||||
```shell
|
||||
"subnets": [
|
||||
{
|
||||
"name": "subnetname",
|
||||
"id": "/subscriptions/<SubscriptionId>/resourceGroups/<ResourceGroupName>/providers/Microsoft.Network/virtualNetworks/<VirtualNetworkName>/subnets/<SubnetName>",
|
||||
"properties": {
|
||||
"provisioningState": "Succeeded",
|
||||
"addressPrefix": "10.240.0.0/16",
|
||||
"routeTable": {
|
||||
"id": "/subscriptions/<SubscriptionId>/resourceGroups/<ResourceGroupName>/providers/Microsoft.Network/routeTables/<RouteTableResourceName>"
|
||||
}
|
||||
....
|
||||
}
|
||||
....
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
## Walkthrough
|
||||
|
||||
|
|
|
@ -10,6 +10,35 @@ Here are the steps to deploy a simple Kubernetes cluster with Windows:
|
|||
4. edit the [Kubernetes windows example](../examples/windows/kubernetes.json) and fill in the blank strings
|
||||
5. [generate the template](acsengine.md#generating-a-template)
|
||||
6. [deploy the output azuredeploy.json and azuredeploy.parameters.json](../README.md#deployment-usage)
|
||||
7. Temporary workaround when deploying a cluster in a custom VNET with Kubernetes 1.5.3:
|
||||
1. After a cluster has been created in step 6 get id of the route table resource from Microsoft.Network provider in your resource group.
|
||||
The route table resource id is of the format:
|
||||
`/subscriptions/SUBSCRIPTIONID/resourceGroups/RESOURCEGROUPNAME/providers/Microsoft.Network/routeTables/ROUTETABLENAME`
|
||||
2. Update properties of all subnets in the newly created VNET that are used by Kubernetes cluster to refer to the route table resource by appending the following to subnet properties:
|
||||
```shell
|
||||
"routeTable": {
|
||||
"id": "/subscriptions/<SubscriptionId>/resourceGroups/<ResourceGroupName>/providers/Microsoft.Network/routeTables/<RouteTableResourceName>"
|
||||
}
|
||||
```
|
||||
|
||||
E.g.:
|
||||
```shell
|
||||
"subnets": [
|
||||
{
|
||||
"name": "subnetname",
|
||||
"id": "/subscriptions/<SubscriptionId>/resourceGroups/<ResourceGroupName>/providers/Microsoft.Network/virtualNetworks/<VirtualNetworkName>/subnets/<SubnetName>",
|
||||
"properties": {
|
||||
"provisioningState": "Succeeded",
|
||||
"addressPrefix": "10.240.0.0/16",
|
||||
"routeTable": {
|
||||
"id": "/subscriptions/<SubscriptionId>/resourceGroups/<ResourceGroupName>/providers/Microsoft.Network/routeTables/<RouteTableResourceName>"
|
||||
}
|
||||
....
|
||||
}
|
||||
....
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
## Walkthrough
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
"dnsPrefix": "",
|
||||
"vmSize": "Standard_D2_v2",
|
||||
"vnetSubnetId": "/subscriptions/b52fce95-de5f-4b37-afca-db203a5d0b6a/resourceGroups/anhoweKubeVnet/providers/Microsoft.Network/virtualNetworks/KubernetesCustomVNET/subnets/KubernetesSubnet",
|
||||
"firstConsecutiveStaticIP": "10.239.255.245"
|
||||
"firstConsecutiveStaticIP": "10.239.255.239"
|
||||
},
|
||||
"agentPoolProfiles": [
|
||||
{
|
||||
|
|
|
@ -21,13 +21,12 @@
|
|||
{{end}}
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfig1",
|
||||
"name": "ipconfig1",
|
||||
"properties": {
|
||||
"privateIPAddress": "[concat('10.240.245.', copyindex(5))]",
|
||||
"privateIPAllocationMethod": "Static",
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"subnet": {
|
||||
"id": "[variables('{{.Name}}VnetSubnetID')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -1187,8 +1187,7 @@
|
|||
{
|
||||
"name": "ipconfig1",
|
||||
"properties": {
|
||||
"privateIPAddress": "[concat('10.240.245.', copyindex(5))]",
|
||||
"privateIPAllocationMethod": "Static",
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"subnet": {
|
||||
"id": "[variables('agentpool1VnetSubnetID')]"
|
||||
}
|
||||
|
|
|
@ -832,8 +832,7 @@
|
|||
{
|
||||
"name": "ipconfig1",
|
||||
"properties": {
|
||||
"privateIPAddress": "[concat('10.240.245.', copyindex(5))]",
|
||||
"privateIPAllocationMethod": "Static",
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"subnet": {
|
||||
"id": "[variables('agentpool1VnetSubnetID')]"
|
||||
}
|
||||
|
|
|
@ -224,16 +224,6 @@ func (a *Properties) Validate() error {
|
|||
case Swarm:
|
||||
case SwarmMode:
|
||||
case Kubernetes:
|
||||
// there is currently only support for one agent pool to have windows
|
||||
count := 0
|
||||
for _, ap := range a.AgentPoolProfiles {
|
||||
if a.OrchestratorProfile.OrchestratorType == Kubernetes && ap.OSType == Windows {
|
||||
count++
|
||||
}
|
||||
}
|
||||
if count > 1 {
|
||||
return fmt.Errorf("A maximum of one Windows agent pool is allowed for %s, but %d were specified", Kubernetes, count)
|
||||
}
|
||||
default:
|
||||
return fmt.Errorf("Orchestrator %s does not support Windows", a.OrchestratorProfile.OrchestratorType)
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче