Connecting with the Provider

To connect to Azure AKS, follow below steps:

  1. Log in to your Azure account.
  2. Go to your kubernetes service page and click on Connect button and then click on Open Cloud Shell.
  3. Run az ad sp create-for-rbac --role owner --scopes /subscriptions/<YOUR_SUBSCRIPTION_ID> in the cloud shell, you will get response similar to:
     {
       "appId": "xxxxxx-xxxxx-xxxxxx-xxxx",
       "displayName": "azure-cli-2023-11-06-13-00-52",
       "password": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
       "tenant": "xxxxx-xxxxx-xxxx-xxxxx"
     }
    
    In above JSON object, the appId is client_id, password is client_secret and tenant is tenant_id

Notes

  • This provider allows you to interact with Azure AKS to query resources in kubernetes cluster.

Authentication

This provider requires authentication.

  • subscription_id: The azure subscription id (required: True, sensitive: True)
  • client_id: The azure client id (required: True, sensitive: True)
  • client_secret: The azure client secret (required: True, sensitive: True)
  • tenant_id: The azure tenant id (required: True, sensitive: True)
  • resource_group_name: The azure aks resource group name (required: True, sensitive: True)
  • resource_name: The azure aks cluster name (required: True, sensitive: True)

In workflows

This provider can be used in workflows.

As “step” to query data, example:

steps:
    - name: Query aks
      provider: aks
      config: "{{ provider.my_provider_name }}"
      with:
        command_type: {value}  # The command type to operate on the k8s cluster (`get_pods`, `get_pvc`, `get_node_pressure`).

Check the following workflow example: