{product-title} can be configured to access an Azure infrastructure, including using Azure disk as persistent storage for application data. After Azure is configured properly, some additional configurations need to be completed on the {product-title} hosts.
Configuring Azure for {product-title} requires the following role:
Contributor |
To create and manage all types of Azure resources. |
Configuring {product-title} for Azure requires the /etc/azure/azure.conf file, on each node host.
If the file does not exist, create it, and add the following:
tenantId: <> (1) subscriptionId: <> (2) aadClientId: <> (3) aadClientSecret: <> (4) aadTenantId: <> (5) resourceGroup: <> (6) cloud: <> (7) location: <> (8) vnetName: <> (9) securityGroupName: <> (10) primaryAvailabilitySetName: <> (11)
-
The AAD tenant ID for the subscription that the cluster is deployed in.
-
The Azure subscription ID that the cluster is deployed in.
-
The client ID for an AAD application with RBAC access to talk to Azure RM APIs.
-
The client secret for an AAD application with RBAC access to talk to Azure RM APIs.
-
Ensure this is the same as tenant ID (optional).
-
The Azure Resource Group name that the Azure VM belongs to.
-
The specific cloud region. For example,
AzurePublicCloud
. -
The compact style Azure region. For example,
southeastasia
(optional). -
Virtual network containing instances and used when creating load balancers.
-
Security group name associated with instances and load balancers.
-
Availability set to use when creating resources such as load balancers (optional).
Important
|
The NIC used for accessing the instance must have an |
During cluster installations, Azure can be configured using the following parameters, which are configurable in the inventory file.
# Cloud Provider Configuration # # Note: You may make use of environment variables rather than store # sensitive configuration within the ansible inventory. # For example: openshift_cloudprovider_kind=azure openshift_cloudprovider_azure_client_id="{{ lookup('env','AZURE_CLIENT_ID') }}" openshift_cloudprovider_azure_client_secret="{{ lookup('env','AZURE_CLIENT_SECRET') }}" openshift_cloudprovider_azure_tenant_id="{{ lookup('env','AZURE_TENANT_ID') }}" openshift_cloudprovider_azure_subscription_id="{{ lookup('env','AZURE_SUBSCRIPTION_ID') }}" openshift_cloudprovider_azure_resource_group=openshift openshift_cloudprovider_azure_location=australiasoutheast
Note
|
When Ansible configures Azure, the following additional files are created for you:
|
Edit or
create the
master configuration file on all masters
(/etc/origin/master/master-config.yaml by default) and update the
contents of the apiServerArguments
and controllerArguments
sections:
kubernetesMasterConfig:
...
apiServerArguments:
cloud-provider:
- "azure"
cloud-config:
- "/etc/azure/azure.conf"
controllerArguments:
cloud-provider:
- "azure"
cloud-config:
- "/etc/azure/azure.conf"
Important
|
When triggering a containerized installation, only the /etc/origin and /var/lib/origin directories are mounted to the master and node container. Therefore, master-config.yaml should be in /etc/origin/master instead of /etc/. |
-
Edit or create the node configuration file on all nodes (/etc/origin/node/node-config.yaml by default) and update the contents of the
kubeletArguments
section:kubeletArguments: cloud-provider: - "azure" cloud-config: - "/etc/azure/azure.conf"
ImportantWhen triggering a containerized installation, only the /etc/origin and /var/lib/origin directories are mounted to the master and node container. Therefore, node-config.yaml should be in /etc/origin/node instead of /etc/.