Use only CLUSTER-IP and not EXTERNAL-IP

12/19/2017

I am setting up a Cassandra cluster in Kubernetes.

Following this: https://github.com/GoogleCloudPlatform/cassandra-docker/blob/master/3/README.md#using-kubernetes

I am setting a Loadbalencer with:

kubectl expose pod some-cassandra --name some-cassandra-7000 \
  --type LoadBalancer --port 7000 --protocol TCP

I guess this will expose an external ip to the internet. Now Cassandra nodes/containers only have to responde internally on Kubernetres pods, how can I do that?

-- Chris G.
kubernetes

1 Answer

12/20/2017

Service type ClusterIP or a headless one will be available within the cluster and not exposed externally.

-- Radek 'Goblin' Pieczonka
Source: StackOverflow