Red Hat Training

A Red Hat training course is available for OpenShift Container Platform

24.4. 为 Microsoft Azure 配置 OpenShift Container Platform

您可以通过两种方式为 Microsoft Azure 配置 OpenShift Container Platform:

24.4.1. 使用 Ansible 为 Azure 配置 OpenShift Container Platform

您可以在安装时为 Azure 配置 OpenShift Container Platform。

将以下内容添加到位于 /etc/ansible/hosts 的 Ansible 清单文件中,以配置 Microsoft Azure 的 OpenShift Container Platform 环境:

[OSEv3:vars]
openshift_cloudprovider_kind=azure
openshift_cloudprovider_azure_client_id=<app_ID> 1
openshift_cloudprovider_azure_client_secret=<secret> 2
openshift_cloudprovider_azure_tenant_id=<tenant_ID> 3
openshift_cloudprovider_azure_subscription_id=<subscription> 4
openshift_cloudprovider_azure_resource_group=<resource_group> 5
openshift_cloudprovider_azure_location=<location> 6
1
服务主体的 app ID 值。
2
包含服务主体密码的 secret。
3
服务主体所在的租户。
4
服务主体使用的订阅。
5
服务帐户所在的资源组。
6
资源组所在的 Microsoft Azure 位置。

使用 Ansible 安装也会创建并配置以下文件以适合您的 Microsoft Azure 环境:

  • /etc/origin/cloudprovider/azure.conf
  • /etc/origin/master/master-config.yaml
  • /etc/origin/node/node-config.yaml