title: Problem testing RBAC permissions, using optional resourceName
body: <p>I am trying to check if I set permissions correctly in a role <code>developer</code> to get a specific pod called <code>dark-blue-app</code>. The role is:</p>
  <pre><code>apiVersion: rbac.authorization.k8s.io/v1
  kind: Role
  metadata:
    creationTimestamp: &quot;2022-06-13T00:24:53Z&quot;
    name: developer
    namespace: blue
    resourceVersion: &quot;4099&quot;
    uid: ac280f91-da44-4a33-aa5e-3b4176f8a3a6
  rules:
  - apiGroups:
    - &quot;&quot;
    resourceNames:
    - dark-blue-app
    resources:
    - pods
    verbs:
    - list
    - create
    - delete
  </code></pre>
  <p>And I have a <code>rolebinding</code> set to it (<code>dev-user-binding</code>).</p>
  <p>Testing to see if I have right permissions I executed:</p>
  <pre><code>kubectl auth can-i get pod -n=blue --as developer
  </code></pre>
  <p>Which returned <code>YES</code></p>
  <p>But, if I try to run to check specifically for <code>dark-blue-app</code>:</p>
  <pre><code>kubectl auth can-i get pod dark-blue-app -n=blue --as dev-user
  </code></pre>
  <p>Returns:</p>
  <pre><code>error: you must specify two or three arguments: verb, resource, and optional resourceName
  </code></pre>
  <p><strong>EDIT:</strong></p>
  <p>This is dev-user-binding</p>
  <pre><code>apiVersion: rbac.authorization.k8s.io/v1
  kind: RoleBinding
  metadata:
    creationTimestamp: &quot;2022-06-13T01:14:15Z&quot;
    name: dev-user-binding
    namespace: default
    resourceVersion: &quot;1522&quot;
    uid: 29d2092e-fbb6-454c-8a7e-b83f3158abb2
  roleRef:
    apiGroup: rbac.authorization.k8s.io
    kind: Role
    name: developer
  subjects:
  - apiGroup: rbac.authorization.k8s.io
    kind: User
    name: dev-user
  </code></pre>