Hello everybody, 

I was following the kubernetes tutorial from here
https://kubernetes.io/docs/tutorials/stateful-application/zookeeper/. The 
tutorial is great and I was able to run it successfully.

However, I tried to reproduce the steps of running zookeeper using a separate 
namespace.
First, I tried to configure the zoo.cfg  like this:
 
server.1=zk-0.zk-headless:2888:3888
server.2=zk-1.zk-headless:2888:3888
server.3=zk-2.zk-headless:2888:3888

This setup didn't work. Only two nodes server.2 and server.3 were forming a 
cluster, sometimes also server.1 and server.2 but it was always that one of the 
servers didn't join the cluster.

The configuration that worked for me for zoo.cfg was:

server.1=zk-0.zk-headless.mynamespace.svc.cluster.local:2888:3888
server.2=zk-1.zk-headless.mynamespace.svc.cluster.local:2888:3888
server.3=zk-2.zk-headless.mynamespace.svc.cluster.local:2888:3888

With this config all 3 zookeepers were forming a cluster and everything works 
fine. 
The question is why do I need to specify the FQDN for this example to work? 
Even in the first case were I specified statefulset.service, this name was 
resolved to only one IP. Are FQDN always
 necessary when referencing a pod in a stateful set like in the above example? 


I'm running kubernetes 1.6 on AWS with one master and one worked node. 

Thanks, 
George

-- 
You received this message because you are subscribed to the Google Groups 
"Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to kubernetes-users+unsubscr...@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to