kube-forbidden (Pro)
helm 3:
Error: Unable to continue with install: could not get information about the resource ServiceAccount "r-c" in namespace "forb": serviceaccounts "r-c" is forbidden: User "system:serviceaccount:forb:op" cannot get resource "serviceaccounts" in API group "" in the namespace "forb"helm 4:
Error: unable to continue with install: could not get information about the resource ServiceAccount "r-c" in namespace "forb": serviceaccounts "r-c" is forbidden: User "system:serviceaccount:forb:op" cannot get resource "serviceaccounts" in API group "" in the namespace "forb"kubectl, when dojo-deploy applies the release’s Secrets and ConfigMaps:
Error from server (Forbidden): secrets "s" is forbidden: User "system:serviceaccount:forb:op" cannot patch resource "secrets" in API group "" in the namespace "forb"The user, verb, resource and namespace in the line are yours. dojo-deploy reports any of these in the render, install, upgrade or status phase with Hint: kube-forbidden.
Cause
The Kubernetes identity this run uses lacks a permission that dojo-deploy check does not review.
Confirm
The line names the identity (User "..."), the verb (cannot get, cannot patch), the resource and the namespace. Ask the cluster whether that identity has it, with the same kubeconfig and context the run used:
kubectl auth can-i <verb> <resource> -n <namespace>
kubectl auth can-i --list -n <namespace>dojo-deploy check lists the permissions it reviews.
Recover
Grant the identity the verb on the resource the error names, in the install’s namespace (a Role and RoleBinding, or your cluster’s equivalent), or run dojo-deploy as an identity that already has it. Then run the command on the To resume: line.