<p>I am trying to setup spinnaker with kubernetes and getting an error: user cannot list namespace.</p>

<p>I don't have access to list namespace in cluster scope. Is it possible to set up and apply hal configuration without access to list namespaces at cluster scope? if yes, please let me know the steps.</p>

<p>Below I mention the command out for reference:</p>

<pre><code>hal deploy apply
+ Get current deployment
  Success
- Prep deployment
  Failure
Problems in default.provider.kubernetes.my-k8s-account:
! ERROR Unable to communicate with your Kubernetes cluster: Failure
  executing: GET at: https://&lt;company&gt;/api/v1/namespaces. Message:
  Forbidden! User apc doesn't have permission. namespaces is forbidden: User
  "system:anonymous" cannot list namespaces at the cluster scope..
? Unable to authenticate with your Kubernetes cluster. Try using
  kubectl to verify your credentials.

- Failed to prep Spinnaker deployment
</code></pre>

<hr>

<pre><code>$ kubectl get ns
No resources found.
Error from server (Forbidden): namespaces is forbidden: User "ds:uid:2319639648" cannot list namespaces at the cluster scope
</code></pre>

<hr>

<p>Regards,
Ajaz</p>

<p>Short answer: no.</p>

<p>You can try to get your admin to give you access to a <code>ClusterRole</code>+<code>RoleBinding</code> that has access to namespaces read.</p>

<p>Something like this:</p>

<pre><code>kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: namespace-reader
rules:
- apiGroups: [""]
  resources: ["namespaces"]
  verbs: ["get", "watch", "list"]

---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: read-all-namespaces
subjects:
- kind: User
  name: your-user
  apiGroup: rbac.authorization.k8s.io
roleRef:
  kind: ClusterRole
  name: namespace-reader
  apiGroup: rbac.authorization.k8s.io
</code></pre>
