ClusterIP
What is ClusterIP?
ClusterIP: The default Service type. Gives the Service an internal-only virtual IP reachable from inside the cluster — not from the outside world. ClusterIP is the default Kubernetes Service type. It gives a set of pods one stable internal IP address and DNS name, reachable only from inside the cluster. Pods come and go, and their IP addresses change. A Service called mysql stays the same, so your application connects to mysql:3306 and Kubernetes forwards the traffic to a healthy pod behind it.
Frequently asked questions about ClusterIP
What should you keep in mind with ClusterIP?
Most services in a cluster should be ClusterIP: databases, caches, internal APIs and queues. They have no reason to be reachable from the internet. For public traffic, put an Ingress or a LoadBalancer Service in front of only the components that need it. That keeps the attack surface small and the network setup easy to understand.
What does an example of ClusterIP look like?
spec: type: ClusterIP # default, can be omitted ports: - port: 80 At a glance
| Category | Kubernetes |
|---|---|
| Explained by | Reinier de la Parra |
| Updated |