<p>Im trying to create a job to list all resources because my connection is terrible. Is there any way to give permission to a pod run the below command?</p>
<p>Here is ClusterRole that I am trying:</p>
<pre><code>kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  namespace: istio-system
  name: workaround
rules:
- apiGroups: [&quot;&quot;]
  resources:
  - '*'
  verbs:  
  - '*'
- apiGroups: ['*']
  resources:
  - '*'
  verbs:  
  - '*'
</code></pre>
<p>The command is:</p>
<pre><code>kubectl api-resources --verbs=list --namespaced -o name | xargs -n 1 kubectl get -n ibm-rancher
</code></pre>

<p>If you are just looking to give your workload an admin role, you can use the prebuilt <code>cluster-admin</code> cluster role which should be available on every k8s cluster.<br />
See the docs for more details - <a href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles" rel="nofollow noreferrer">https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles</a></p>
