I tried to deploy mysql
and cassandra
databases using kubernetes.io/docs instructions. In both of them, within the service.yaml
files, they use clusterIP: None
like following:
For cassandra
:
apiVersion: v1
kind: Service
metadata:
labels:
app: cassandra
name: cassandra
spec:
ports:
- port: 9042
selector:
app: cassandra
clusterIP: None
For mysql
:
apiVersion: v1
kind: Service
metadata:
name: mysql
spec:
ports:
- port: 3306
selector:
app: mysql
clusterIP: None
I would like to know, why they don't specify clusterIP
in the service.yaml
file? How should we specify it and what would be the use cases?