We have created a statefulset & headless service to deploy Cassandra in Kubernetes. Our client is also in the same Kubernetes cluster. We have identified two ways by which we can find contact point for driver in client application:
1. Use 'cassandra-headless-service-name' as contactPoints 2. Fetch the IPs of pods from headless-service & externalize the IPs. Read these IP as contact points when initializing the connection. So far so good. Above will work if one/some pods are restarted and their IP changes. In this case, the driver will update the new IP automatically. *How will this work in case of complete outage (all Cassandra pods down) ? If all the pods are down and they come back online with different IPs (IP can change in Kubernetes), how will the application connect to Cassandra?* *What is the best way to connect Cassandra cluster in Kubernetes with a client running in the same cluster.* Regards, Pushpendra