Access Cassandra on Kubernetes

Hi,

You can check example definition in Lagom Auction - Deploy projects

DNS SRV for kafka, cassandra or any other “external” service that is configured using DNS SRV will depend on the “external” service configuration.
Example configuration for cassandra running outside of kubernetes cluster using headless service:

apiVersion: v1
kind: Service
metadata:
  name: cassandra
  namespace: msrp
spec:
  ports:
  - name: "cql"
    protocol: "TCP"
    port: 9042
    targetPort: 9042
    nodePort: 0

---
apiVersion: v1
kind: Endpoints
metadata:
 name: cassandra
 namespace: msrp
subsets:
 - addresses:
     - ip: 10.0.1.6
     - ip: 10.0.2.93
     - ip: 10.0.3.99
   ports:
     - name: "cql"
       port: 9042

So for this configuration DNS SRV will be:
_cql._tcp.cassandra.msrp.svc.cluster.local

Check DNS for Services and Pods - DNS SRV for details

Hope this helps.

BR,
Alan