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.

54 lines
2.4 KiB

  1. Azure
  2. ===============
  3. To deploy kubespray on [Azure](https://azure.microsoft.com) uncomment the `cloud_provider` option in `group_vars/all.yml` and set it to `'azure'`.
  4. 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.
  5. Not all features are supported yet though, for a list of the current status have a look [here](https://github.com/colemickens/azure-kubernetes-status)
  6. ### Parameters
  7. Before creating the instances you must first set the `azure_` variables in the `group_vars/all.yml` file.
  8. 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
  9. After installation you have to run `azure login` to get access to your account.
  10. #### azure\_tenant\_id + azure\_subscription\_id
  11. run `azure account show` to retrieve your subscription id and tenant id:
  12. `azure_tenant_id` -> Tenant ID field
  13. `azure_subscription_id` -> ID field
  14. #### azure\_location
  15. 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`
  16. #### azure\_resource\_group
  17. The name of the resource group your instances are in, can be retrieved via `azure group list`
  18. #### azure\_vnet\_name
  19. The name of the virtual network your instances are in, can be retrieved via `azure network vnet list`
  20. #### azure\_subnet\_name
  21. The name of the subnet your instances are in, can be retrieved via `azure network vnet subnet list RESOURCE_GROUP VNET_NAME`
  22. #### azure\_security\_group\_name
  23. The name of the network security group your instances are in, can be retrieved via `azure network nsg list`
  24. #### azure\_aad\_client\_id + azure\_aad\_client\_secret
  25. These will have to be generated first:
  26. - Create an Azure AD Application with:
  27. `azure ad app create --name kubernetes --identifier-uris http://kubernetes --home-page http://example.com --password CLIENT_SECRET`
  28. The name, identifier-uri, home-page and the password can be choosen
  29. Note the AppId in the output.
  30. - Create Service principal for the application with:
  31. `azure ad sp create --applicationId AppId`
  32. This is the AppId from the last command
  33. - Create the role assignment with:
  34. `azure role assignment create --spn http://kubernetes -o "Owner" -c /subscriptions/SUBSCRIPTION_ID`
  35. azure\_aad\_client\_id musst be set to the AppId, azure\_aad\_client\_secret is your choosen secret.