nanit / kubernetes-rabbitmq-cluster

Deploy-ready rabbitmq cluster for kubernetes
MIT License
197 stars 84 forks source link

Kubernetes 1.8.2 curl: (22) The requested URL returned error: 403 Forbidden #24

Closed zelentsovl closed 6 years ago

zelentsovl commented 6 years ago

Hello,

after upgrading Kubernetes cluster to 1.8.2 pods are crashing. I can see next error in logs: curl: (22) The requested URL returned error: 403 Forbidden

I suspect the problem is in the next string of set_cluster_nodes.sh script:

STATEFUL_SETS=$(curl -f -k https://${KUBERNETES_SERVICE_HOST}/apis/apps/v1beta1/statefulsets -H "Authorization: Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)")

For some reason the url is not accessible.

erez-rabih commented 6 years ago

Did you enable RBAC on the Kubernetes API server? It sounds like this is the problem rom what you're describing. If so, this pr (https://github.com/nanit/kubernetes-rabbitmq-cluster/pull/19) added RBAC support. If it still doesn't resolve the issue please reply here so we can investigate more thoroughly.

zelentsovl commented 6 years ago

@erez-rabih enabling RBAC has solved the issue. Thank you!

erez-rabih commented 6 years ago

Great, thanks for reporting back on this.