Services
API objects that provide reliable network endpoints and load balancing for a pod or set of pods.
Services are used to expose pods over a network. They maintain static IP addresses and DNS records, regardless of scaling, restarts, or migrations. Services choose which pods to useforward traffic to based on a set of criteria defined in the service declaration, and labels defined in the pods declaration.
types of services
- Cluster IP (default): Expose the service on the cluster's network, making it only visible to other nodes in the cluster
- Node Port: Expose the service to a static port on each node's IP
- Load Balancer: Connects to an external, cloud-based load balancer for a single, stable external IP.
- External Name: Maps to a DNS name outside the cluster without proxying the traffic
- Headless: Provides no cluster IP