Helm upgrade Error- Creating Service Account through helm

Vatika Saxena 0 Reputation points
2025-07-23T16:58:48.1+00:00
  1. Starting: Helm upgrade selfhelp-identity-server ============================================================================== Task : Package and deploy Helm charts Description : Deploy, configure, update a Kubernetes cluster in Azure Container Service by running helm commands Version : 0.259.2 Author : Microsoft Corporation Help : https://aka.ms/azpipes-helm-tsg ============================================================================== /opt/hostedtoolcache/helm/3.9.0/x64/linux-amd64/helm upgrade --namespace vsc-prod --install --values /home/vsts/work/1/Values/selfhelp-identity-server-values.yaml --version v13165 --skip-crds selfhelp-identity-server /home/vsts/work/1/a/selfhelp-identity-server-v13165.tgz Release "selfhelp-identity-server" does not exist. Installing it now. Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: failed to check CRD: failed to list CRDs: customresourcedefinitions.apiextensions.k8s.io is forbidden: User "system:serviceaccount:vsc-prod:***" cannot list resource "customresourcedefinitions" in API group "apiextensions.k8s.io" at the cluster scope ##[error]Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: failed to check CRD: failed to list CRDs: customresourcedefinitions.apiextensions.k8s.io is forbidden: User "system:serviceaccount:vsc-prod:***" cannot list resource "customresourcedefinitions" in API group "apiextensions.k8s.io" at the cluster scope Finishing: Helm upgrade selfhelp-identity-server
Azure Kubernetes Service
Azure Kubernetes Service
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Akram Kathimi 1,751 Reputation points Microsoft Employee
    2025-07-24T06:51:01.9333333+00:00

    Hi @Vatika Saxena

    Thank you for posting this.

    The error is related to Kubernetes Role-Based Access Control (RBAC). The service account used to create the CRDs in the helm chart does not have the needed permission.

    To resolve the issue, create a ClusterRoleBinding to a custom ClusterRole or a built in role with the permission to create CRDs.

    I strongly recommend reading the official Kubernetes Authorization document to understand how it works.

    You can test if a service account has the required permission using:

    kubectl auth can-i get customresourcedefinitions.apiextensions.k8s.io --as=system:serviceaccount:vsc-prod:<>
    

    Please Accept the answer if the information helped you. This will help us and others in the community as well.


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.