<p>I'm trying to get cluster info like pods through <code>curl -k https://172.26.2.101:6443/api/v1/pods</code> but i'm getting bellow forbidden error, however, I checked the admin rights and made sure it's in the &quot;system:masters&quot; group.</p>
<pre><code>{
  &quot;kind&quot;: &quot;Status&quot;,
  &quot;apiVersion&quot;: &quot;v1&quot;,
  &quot;metadata&quot;: {
    
  },
  &quot;status&quot;: &quot;Failure&quot;,
  &quot;message&quot;: &quot;pods is forbidden: User \&quot;system:anonymous\&quot; cannot list resource \&quot;pods\&quot; in API group \&quot;\&quot; at the cluster scope&quot;,
  &quot;reason&quot;: &quot;Forbidden&quot;,
  &quot;details&quot;: {
    &quot;kind&quot;: &quot;pods&quot;
  },
  &quot;code&quot;: 403
</code></pre>
<p>Any idea ?!</p>

Nurhun
<p>Solved by capturing certs from the .kube/config file</p>
<p>client-key-data:</p>
<pre><code>echo -n &quot;LS0...Cg==&quot; | base64 -d &gt; admin.key
</code></pre>
<p>client-certificate-data:</p>
<pre><code>echo -n &quot;LS0...C==&quot; | base64 -d &gt; admin.crt
</code></pre>
<p>certificate-authority-data:</p>
<pre><code>echo -n &quot;LS0...g==&quot; | base64 -d &gt; ca.crt
</code></pre>
<p>Then, use</p>
<pre><code>curl https://172.26.2.101:6443 \
--key admin.key \
--cert admin.crt 
--cacert ca.crt 
</code></pre>
