<p>I'm trying to deploy a Kubernetes Operator using <a href="https://kopf.readthedocs.io/en/stable/" rel="nofollow noreferrer">Kopf</a> and I'm getting the following error:</p>
<pre><code>kopf._cogs.clients.errors.APIForbiddenError: ('exchangerates.operators.brennerm.github.io is forbidden: User &quot;system:serviceaccount:default:exchangerates-operator&quot; cannot list resource &quot;exchangerates&quot; in API group &quot;operators.brennerm.github.io&quot; at the cluster scope', {'kind': 'Status', 'apiVersion': 'v1', 'metadata': {}, 'status': 'Failure', 'message': 'exchangerates.operators.brennerm.github.io is forbidden: User &quot;system:serviceaccount:default:exchangerates-operator&quot; cannot list resource &quot;exchangerates&quot; in API group &quot;operators.brennerm.github.io&quot; at the cluster scope', 'reason': 'Forbidden', 'details': {'group': 'operators.brennerm.github.io', 'kind': 'exchangerates'}, 'code': 403})
</code></pre>
<p>What's confusing is that if I check the permissions granted to the Service Account it looks like it has the correct permissions:</p>
<pre><code>$ kubectl auth can-i list exchangerates --as=system:serviceaccount:default:exchangerates-operator
yes
$ kubectl auth can-i list exchangerates --as=system:serviceaccount:default:exchangerates-operator --all-namespaces
yes
</code></pre>
<p>Is there somewhere else I should be looking to troubleshoot the issue?</p>

<p>User <a href="https://stackoverflow.com/users/857383/sergey-vasilyev" title="3,401 reputation">Sergey Vasilyev</a> has tested this configuration and mentioned in the comment:</p>
<blockquote>
<p>You are right, &quot;*&quot; works. I tried your repo locally with Minikube 1.24.0 &amp; K8s 1.22.3 — it works, there are no permission errors. The operator and the setup are both correct. Similarly for K3d — it works. I assume it is something with your local setup or old images left somewhere.</p>
</blockquote>
<p>I also tested. I ran it locally on Minikube and had no problems. Your setup looks fine, everything works fine. Probably the problem may be with some dependencies in the image, or with Minikube leftovers. Bear in mind that Minikube is mainly used for testing and learning purposes so some of it's features might not be ideal. As for solving your problem, just try creating a new cluster.</p>
