Unable to install Azure Policy extension on an Arc Enabled Kubernetes cluster

Alex Tcherniakhovski 6 Reputation points
2022-09-12T20:44:20.46+00:00

I am attempting to install the Azure Policy extension on a newly deployed Arc Kubernetes cluster.

az k8s-extension delete --cluster-type connectedClusters --cluster-name azure-arc-test-01 --resource-group arc-enabled-kubernetes-poc --name azurepolicy  

However, I am getting the following error:

Code: ExtensionOperationFailed  
Message: The extension operation failed with the following error:    
Error: {failed to install chart from path [] for release [azurepolicy]:   
err [unable to build kubernetes objects from release manifest:   
unable to recognize "": no matches for kind "PodSecurityPolicy" in version "policy/v1beta1"]} occurred while doing the operation :   
{Installing the extension} on the config.  

Kubernetes version is 1.25.

I believe that the error might be caused by the fact that PodSecurityPolicy is located in extensions/v1beta1 and not in policy/v1beta - discussed here: 8789

I am looking for suggestions on how I could get around this issue. Specifically, could I download the required Helm chart and point to extensions/v1beta1?

I also asked the same question here: unable-to-install-azure-policy-extension-on-an-arc-enabled-kubernetes-cluster
Thank you.

Azure Arc
Azure Arc
A Microsoft cloud service that enables deployment of Azure services across hybrid and multicloud environments.
399 questions
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,062 questions
{count} vote

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.