title: Kubernetes unable to query kubernetes secret using API
body: <p>I am trying to query <code>kubernetes secret</code> using APIs and  I provided required permission to account <code>&quot;default:default&quot;</code> using the following command</p>
  <pre><code>kubectl create rolebinding default-viewer \
    --clusterrole=view \
    --serviceaccount=default:default \
    --namespace=default
  </code></pre>
  <p>I was able to query the pods under namespace &quot;default&quot; using the following command</p>
  <pre><code>   curl -v -s https://10.xx.xx.xx:6443/api/v1/namespaces/default/pods --header &quot;Authorization: Bearer $TOKEN&quot; --cacert /tmp/ca.crt
  </code></pre>
  <p>However, when I try to get the <code>secrets</code> from namespace <code>&quot;default&quot;</code> it errored with the following</p>
  <pre><code>curl -v -s https://10.xx.xx.xx:6443/api/v1/namespaces/default/secrets --header &quot;Authorization: Bearer $TOKEN&quot; --cacert /tmp/ca.crt
  </code></pre>
  <p><strong>ERROR</strong></p>
  <pre><code> &quot;message&quot;: &quot;secrets is forbidden: User \&quot;system:serviceaccount:default:default\&quot; cannot list resource \&quot;secrets\&quot; in API group \&quot;\&quot; in the namespace \&quot;default\&quot;&quot;,
  </code></pre>
  <p>I am not sure what am I missing here?  Any help</p>