1. When using RC,RS,deployement, pods are terminated and created during scaling or replication operations
When using deployment , while updating the image version the pods are terminated and new pods take the
place of other pods.
2.
Pods are very dynamic i.e. they come & go on the k8s cluster and on any of the available nodes & it would
be difficult to access the pods as the pods IP changes its recreated.
3.
4. Service objects is an logical bridge between pods and end user, which provide virtual IP
5. Service allow client to reliably connect to the the containers running in the pod using the VIP
The VIP is not a actual IP connected to a network interface, but its purpose is purely forward traffic to one or
more pods
6.
kube proxy is the one which keeps the mapping between the VIP and pods up to date, which queries the API
server to learn about new services in the cluster
7.
8. Although each pod having unique IP address, but those are not accessible outside the cluster.
9. Services help to expose the VIP mapped to the pod & allow application to receive traffic
10. Label are used to select which are the pods to be put under the service
11. Creating a service will create an endpoint to access the pods/application in it.
Service can be expose in 3 different way be specifying a type in the service spec
a. Cluster IP
b. Node Port
c. Load Balancer
12.
13. By default service can run only between ports 30,000 - 32767.
14. The set of pods targeted by a service usually determined by a selector