Kubernetes uses pods as logical containers that store numerous application containers & shared volumes, ensuring co-location and stability. Kubernetes manages using pods rather than individual containers, ensuring that containers within the same pod share networking, storage, and lifecycle on the same machine, resulting in efficient operation.
We need pods in clusters because they allow for data sharing and communication among their members. So we may access pod applications using the same IP and port.
Three different types of multi-container pods.
Kubernetes Services makes network access to a collection of Pods easier by categorizing them based on labels. Requests to a Service are sent to all Pods in the cluster that matches the Service's selector, ensuring smooth communication throughout the Kubernetes ecosystem.
Services are programmes that maintain the list of pod IP addresses for a deployment. Services choose pods depending on their labels. When a network request is sent to the service, it selects all Pods that match the service's selector, chooses one, and returns the network request.
There are four types of service in Kubernetes: