<p>What RBAC role resource type would I use for raw type?</p>
<p>ex. <code>kubectl get --raw &quot;/api/v1/nodes/(your-node-name)/proxy/stats/summary&quot;</code></p>
<pre class="lang-yaml prettyprint-override"><code>
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: k8s-ephemeral-storage-metrics-debug
rules:
  - apiGroups: [&quot;&quot;]
    resources: [&quot;*&quot;]
    verbs: [&quot;*&quot;]

</code></pre>
<p>or go raw API k8s calls?</p>
<pre class="lang-golang prettyprint-override"><code>
content, err := clientset.RESTClient().Get().AbsPath(fmt.Sprintf(&quot;/api/v1/nodes/%s/proxy/stats/summary&quot;, currentNode)).DoRaw(context.Background())
</code></pre>

jmcgrath207
<p>The <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#node-v1-core" rel="nofollow noreferrer">API documentation</a> names this operation &quot;Get Connect Proxy Path&quot; and more specifically describes the URL as</p>
<pre class="lang-none prettyprint-override"><code>GET /api/v1/nodes/{name}/proxy/{path}
</code></pre>
<p>The <code>.../proxy/...</code> part is the interesting part.  It indicates that you're not using basic CRUD operations on a Node object, but rather accessing some <em>subresource</em> of the Node.  The RBAC setup has <a href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources" rel="nofollow noreferrer">specific syntax for subresources</a>.</p>
<p>You need to break the URL down into its component parts
You can break this down into several component parts:</p>
<pre class="lang-none prettyprint-override"><code>  (no API group)
        v
GET /api/v1/nodes/{name}/proxy/{path}
            ^^^^^        ^^^^^
           resource   subresource
</code></pre>
<p>You then use the <code>resource/subresource</code> name in the RBAC definition</p>
<pre class="lang-yaml prettyprint-override"><code>kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: k8s-ephemeral-storage-metrics-debug
rules:
  - apiGroups: [&quot;&quot;]
    resources: [&quot;node/proxy&quot;]
    verbs: [&quot;get&quot;]
</code></pre>
