github.com/Azure/aad-pod-identity@v1.8.17/website/content/en/docs/Configure/custom_cloud.md (about)

     1  ---
     2  title: "Pod Identity in Custom Cloud"
     3  linkTitle: "Pod Identity in Custom Cloud"
     4  weight: 5
     5  description: >
     6    Using AAD Pod Identity in custom Azure cloud environment.
     7  ---
     8  
     9  This document highlights the steps to configure and use AAD Pod Identity in custom Azure cloud environments.
    10  If you are deploying with helm, then set `mic.customCloud.enabled` to true (e.g., `--set mic.customCloud.enabled=true`
    11  on the command line) to have the following configuration changes rendered. The custom cloud environment file
    12  name can be changed from `/etc/kubernetes/akscustom.json` by setting `mic.customCloud.configPath`.
    13  
    14  1. Ensure the cloud name in `/etc/kubernetes/azure.json` is set to `AzureStackCloud`
    15  
    16      ```json
    17      {
    18          "cloud": "AzureStackCloud",
    19          "tenantId": "xxxx",
    20          "subscriptionId": "xxxx",
    21          ...
    22      }
    23      ```
    24  
    25  2. Mount the JSON file that contains the custom cloud environment details. The custom cloud environment file is stored in the file system of the Kubernetes node. The `go-autorest` library is configured to [read the Azure environment from file](https://github.com/Azure/go-autorest/blob/autorest/v0.10.0/autorest/azure/environments.go#L219-L221) by default for `AzureStackCloud`
    26  
    27      > NOTE: In case of AKS clusters, the custom cloud environment file is `/etc/kubernetes/akscustom.json`
    28  
    29      The file needs to be mounted only for the MIC pods.
    30  
    31      Add the custom environment file volume mount in MIC deployment:
    32      ```yaml
    33      - name: custom-env-file
    34        mountPath: /etc/kubernetes/akscustom.json
    35        readOnly: true
    36      ```
    37      Add the custom environment file volume in MIC deployment:
    38      ```yaml
    39      - name: custom-env-file
    40        hostPath:
    41          path: /etc/kubernetes/akscustom.json
    42      ```
    43  
    44  3. Set the `AZURE_ENVIRONMENT_FILEPATH` environment variable as part of MIC deployment. This is used by `go-autorest` to [read the custom cloud environment file](https://github.com/Azure/go-autorest/blob/autorest/v0.10.0/autorest/azure/environments.go#L26-L28).
    45  
    46      Add the environment variable to MIC deployment:
    47      ```yaml
    48      - name: AZURE_ENVIRONMENT_FILEPATH
    49        value: "/etc/kubernetes/akscustom.json"
    50      ```