Thanks for posting your question in the Microsoft Q&A forum.
The error you're encountering is due to a policy that restricts the creation of resources in the default namespace of your Azure Kubernetes Service (AKS) cluster. This is a common security practice to ensure better organization and isolation of resources. To resolve this issue, you need to:
- Specify a non-default namespace in your deployment YAML file.
- Create the namespace if it doesn't already exist.
If you want to set a default namespace for your current context to avoid specifying it in every command, use:
kubectl config set-context --current --namespace=your-namespace-name
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful