You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

87 lines
3.9 KiB

  1. # Azure
  2. To deploy Kubernetes on [Azure](https://azure.microsoft.com) uncomment the `cloud_provider` option in `group_vars/all.yml` and set it to `'azure'`.
  3. All your instances are required to run in a resource group and a routing table has to be attached to the subnet your instances are in.
  4. Not all features are supported yet though, for a list of the current status have a look [here](https://github.com/Azure/AKS)
  5. ## Parameters
  6. Before creating the instances you must first set the `azure_` variables in the `group_vars/all.yml` file.
  7. All of the values can be retrieved using the azure cli tool which can be downloaded here: <https://docs.microsoft.com/en-gb/azure/xplat-cli-install>
  8. After installation you have to run `azure login` to get access to your account.
  9. ### azure\_tenant\_id + azure\_subscription\_id
  10. run `azure account show` to retrieve your subscription id and tenant id:
  11. `azure_tenant_id` -> Tenant ID field
  12. `azure_subscription_id` -> ID field
  13. ### azure\_location
  14. The region your instances are located, can be something like `westeurope` or `westcentralus`. A full list of region names can be retrieved via `azure location list`
  15. ### azure\_resource\_group
  16. The name of the resource group your instances are in, can be retrieved via `azure group list`
  17. ### azure\_vmtype
  18. The type of the vm. Supported values are `standard` or `vmss`. If vm is type of `Virtal Machines` then value is `standard`. If vm is part of `Virtaul Machine Scale Sets` then value is `vmss`
  19. ### azure\_vnet\_name
  20. The name of the virtual network your instances are in, can be retrieved via `azure network vnet list`
  21. ### azure\_subnet\_name
  22. The name of the subnet your instances are in, can be retrieved via `azure network vnet subnet list --resource-group RESOURCE_GROUP --vnet-name VNET_NAME`
  23. ### azure\_security\_group\_name
  24. The name of the network security group your instances are in, can be retrieved via `azure network nsg list`
  25. ### azure\_aad\_client\_id + azure\_aad\_client\_secret
  26. These will have to be generated first:
  27. - Create an Azure AD Application with:
  28. `azure ad app create --display-name kubernetes --identifier-uris http://kubernetes --homepage http://example.com --password CLIENT_SECRET`
  29. display name, identifier-uri, homepage and the password can be chosen
  30. Note the AppId in the output.
  31. - Create Service principal for the application with:
  32. `azure ad sp create --id AppId`
  33. This is the AppId from the last command
  34. - Create the role assignment with:
  35. `azure role assignment create --role "Owner" --assignee http://kubernetes --subscription SUBSCRIPTION_ID`
  36. azure\_aad\_client\_id must be set to the AppId, azure\_aad\_client\_secret is your chosen secret.
  37. ### azure\_loadbalancer\_sku
  38. Sku of Load Balancer and Public IP. Candidate values are: basic and standard.
  39. ### azure\_exclude\_master\_from\_standard\_lb
  40. azure\_exclude\_master\_from\_standard\_lb excludes master nodes from `standard` load balancer.
  41. ### azure\_disable\_outbound\_snat
  42. azure\_disable\_outbound\_snat disables the outbound SNAT for public load balancer rules. It should only be set when azure\_exclude\_master\_from\_standard\_lb is `standard`.
  43. ### azure\_primary\_availability\_set\_name
  44. (Optional) The name of the availability set that should be used as the load balancer backend .If this is set, the Azure
  45. cloudprovider will only add nodes from that availability set to the load balancer backend pool. If this is not set, and
  46. multiple agent pools (availability sets) are used, then the cloudprovider will try to add all nodes to a single backend
  47. pool which is forbidden. In other words, if you use multiple agent pools (availability sets), you MUST set this field.
  48. ### azure\_use\_instance\_metadata
  49. Use instance metadata service where possible
  50. ## Provisioning Azure with Resource Group Templates
  51. You'll find Resource Group Templates and scripts to provision the required infrastructure to Azure in [*contrib/azurerm*](../contrib/azurerm/README.md)