nanit / kubernetes-rabbitmq-cluster

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

Fails on Google Container Engine with namespace other than 'default' #12

Closed grempe closed 7 years ago

grempe commented 7 years ago

If you change the value of export NAMESPACE=default to something other than default this curl command fails and the whole deployment fails. After I deleted everything and ran it again with namespace set to default it all worked fine.

https://github.com/nanit/kubernetes-rabbitmq-cluster/blob/045e2e1fb1e5e82a75b48ee795017132b85a7483/docker/set_cluster_nodes.sh#L8

Perhaps you might have to specify a hostname that includes the namespace?

https://stackoverflow.com/questions/30690186/how-do-i-access-the-kubernetes-api-from-within-a-pod-container#comment75562617_33109739

erez-rabih commented 7 years ago

What makes the CURL fail? I mean, even if the RMQ statefulset is not in the same namespace then the CURL should return an empty list.

Can you please paste here the relevant logs?

grempe commented 7 years ago

Sorry, I am using a different k8s script now to setup rabbitmq and no longer have access to the log. It was a single line error log with a message from curl not being able to access the host. See the linked comment I included as well for someone with a similar issue. I would suggest just spinning up a temp google container engine cluster and deploy your script using a different namespace. I think you will see the issue since I was deploying on a vanilla GCE cluster.

rainder commented 7 years ago

curl: (6) Couldn't resolve host 'kubernetes'

rainder commented 7 years ago

Perhaps you want to use KUBERNETES_SERVICE_HOST environment variable

erez-rabih commented 7 years ago

@rainder Do you mind submitting a PR for this issue?

rainder commented 7 years ago

sure, no problem

erez-rabih commented 7 years ago

closed by #17

erez-rabih commented 7 years ago

If this issue still occurs please re-open

laster-bin commented 6 years ago

ERROR: epmd error for host rabbitmq-1.rmq-cluster: nxdomain (non-existing domain)