Deploy an Azure Kubernetes application programmatically by using Azure CLI

To deploy a Kubernetes application programmatically through Azure CLI, you select the Kubernetes application and settings, accept legal terms and conditions, and finally deploy the application through CLI commands.

Select Kubernetes application

First, you need to select the Kubernetes application that you want to deploy in the Azure portal. You'll also need to copy some of the details for later use.

  1. In the Azure portal, go to the Marketplace page.

  2. Select your Kubernetes application.

  3. Select the required plan.

  4. Select the Create button.

  5. Fill out all the application (extension) details.

  6. In the Review + Create tab, select Download a template for automation. If all the validations are passed, you'll see the ARM template in the editor.

  7. Examine the ARM template:

    1. In the variables section, copy the plan-name, plan-publisher, plan-offerID, and clusterExtensionTypeName values for later use.

        "variables": {
              "plan-name": "DONOTMODIFY",
              "plan-publisher": "DONOTMODIFY",
              "plan-offerID": "DONOTMODIFY",
              "releaseTrain": "DONOTMODIFY",
              "clusterExtensionTypeName": "DONOTMODIFY"
    2. In the resource Microsoft.KubernetesConfiguration/extensions' section, copy the configurationSettings` section for later use..

                "type": "Microsoft.KubernetesConfiguration/extensions",
                "apiVersion": "2022-11-01",
                "name": "[parameters('extensionResourceName')]",          
                "properties": {
                    "extensionType": "[variables('clusterExtensionTypeName')]",
                    "autoUpgradeMinorVersion": true,
                    "releaseTrain": "[variables('releaseTrain')]",
                    "configurationSettings": {
                        "title": "[parameters('app-title')]",
                        "value1": "[parameters('app-value1')]",
                        "value2": "[parameters('app-value2')]"


    If there are no configuration settings in the ARM template, refer to the application-related documentation in Azure Marketplace or on the partner's website.

Accept terms and agreements

Before you can deploy a Kubernetes application, you need to accept its terms and agreements. To do so, run the following command, using the values you copied for plan-publisher, plan-offerID, and plan-name.

az vm image terms accept --offer <plan-offerID> --plan <plan-name> --publisher <plan-publisher>


Although this command is for VMs, it also works for containers. For more information, see the az cm image terms reference.

Deploy the application

To deploy the application (extension) through Azure CLI, follow the steps outlined in Deploy and manage cluster extensions by using Azure CLI.

Next steps