> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/continuous-delivery/troubleshooting-and-resources/armory/general/aws-iam-authenticator-fail-to-read-namespaces-and-failing-to-deploy-to-k8s.md).

# When using aws-iam-authenticator, fail to read namespaces and failing to deploy to k8s clusters

### Issue <a href="#issue" id="issue"></a>

For Kubernetes installations that use `aws-iam-authenticator` for authenticating to the Kubernetes cluster, it has been noticed that upgrading Spinnaker version from **v2.21.4** to **v2.23.5 (or later)** results in Spinnaker unable to deploy across namespaces. Exceptions similar to below are seen on the Clouddriver logs.

```
2021-03-26 13:37:17.325 ERROR 1 --- [      Thread-95] c.n.s.c.k.s.KubernetesCredentials        : Could not list namespaces for account XXXXXX: Failed to read [namespace] from : error: You must be logged in to the server (Unauthorized)
2021-03-26 13:37:17.455 ERROR 1 --- [      Thread-96] c.n.s.c.k.s.KubernetesCredentials        : Could not list namespaces for account XXXXXX Failed to read [namespace] from : error: You must be logged in to the server (Unauthorized)
2021-03-26 13:37:20.010 ERROR 1 --- [      Thread-97] c.n.s.c.k.s.KubernetesCredentials        : Could not list namespaces for account XXXXXXXXXX: Failed to read [namespace] from : Error from server (Forbidden): namespaces is forbidden: User "system:node:XXXXXXXX" cannot list resource "namespaces" in API group "" at the cluster scope
2021-03-26 13:37:55.067 ERROR 1 --- [      Thread-98] c.n.s.c.k.s.KubernetesCredentials        : Could not list namespaces for account XXXXXXXX: Failed to read [namespace] from : Error from server (Forbidden): namespaces is forbidden: User "system:node:XXXXXXXX" cannot list resource "namespaces" in API group "" at the cluster scope
```

### Cause <a href="#cause" id="cause"></a>

It has been identified that the Clouddriver version **2.21.4** has been using a higher version of `aws-iam-authenticator` (0.5.0+) when compared to the version 2.23.5. The version of `aws-iam-authenticator` has been downgraded from 0.5.0 to 0.4.0 to overcome the latency issues that Clouddriver has when invoking a call to the Kubernetes cluster. The complete release notes has can be found at: <https://docs.armory.io/docs/release-notes/rn-armory-spinnaker/armoryspinnaker_v2-23-0/#armory-clouddriver---2221122324>
