Following guide "Deploy an AKS cluster with Confidential Containers and a default policy" error due to missing arguments

cloud D 20 Reputation points
2025-01-01T09:49:10.9566667+00:00

I'm following the guide here https://learn.microsoft.com/en-us/azure/aks/deploy-confidential-containers-default-policy and I create a cluster using the portal.azure.com website. I'm trying to follow the "Deploy to an existing cluster" step by running

az aks nodepool add --resource-group myResourceGroup --name nodepool2 –-cluster-name myAKSCluster --node-count 2 --os-sku AzureLinux --node-vm-size Standard_DC4as_cc_v5 --workload-runtime KataCcIsolation

After changing myResourceGroup to the name of my resource group. I get an error

the following arguments are required: --cluster-name

However the flag "–-cluster-name myAKSCluster" (a new cluster name) exists. What am I missing?

Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,235 questions
0 comments No comments
{count} votes

Accepted answer
  1. Mounika Reddy Anumandla 1,800 Reputation points Microsoft Vendor
    2025-01-02T01:21:13.8733333+00:00

    Hi cloud D,

    Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.

    I have reproduced and tried to Deploy an AKS cluster with Confidential Containers and a default policy to an existing cluster. I have got the same error message.
    User's image

    Upon investigation, I have found that the error occurred because of a subtle issue with the --cluster-name flag. When copying from some web sources, special characters like "long dashes" () are used instead of regular hyphens (-). These are not recognized by the az CLI, leading to the error.

    After editing the command by replacing the long dashes () with standard hyphens (-).

    az aks nodepool add --resource-group myResourceGroup --name nodepool2 --cluster-name myAKSCluster --node-count 2 --os-sku AzureLinux --node-vm-size Standard_DC4as_cc_v5 --workload-runtime KataCcIsolation
    

    I was able to deploy to an exixsting AKS Cluster.User's image

    User's image

    Hope this helps!

    Let me know if you have any further queries!

    If the comment is helpful, please "upvote" or tag me in the comments.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.