<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>

FNU
<p>You can do it without ClusterRole.
Tested, works as expected.</p>

<p>See <a href="https://docs.armory.io/spinnaker-install-admin-guides/install-on-eks/" rel="nofollow noreferrer">instruction</a>.</p>

<p><a href="https://docs.armory.io/spinnaker-install-admin-guides/install-on-eks/#configure-spinnaker-to-install-in-kubernetes" rel="nofollow noreferrer">Configure Spinnaker to install in Kubernetes</a></p>

<p>Important: This will by default limit your Spinnaker to deploying to the namespace specified. If you want to be able to deploy to other namespaces, either add a second cloud provider target or remove the <code>--namespaces</code> flag.</p>

<p>Use the Halyard hal command line tool to configure Halyard to install Spinnaker in your Kubernetes cluster</p>

<pre><code>hal config deploy edit \
  --type distributed \
  --account-name ${ACCOUNT_NAME} \
  --location ${NAMESPACE}
</code></pre>
