How Kubernetes Works – https://www.youtube.com/watch?v=Ut7qSWUZJ1M
What are the difference between kubernetes pods, replicasets, deployment with example. How Rolling updates happens in kubernetes with the help of deployment. What are different types of service in kubernetes? How to expose a pod in kubernetes to other services or outside world? How a service connects to a pod?
Service acts as a network endpoint for other services or external users to connect to
Services are long running object
It has an IP address
It has a stable fixed port
It can be used to connect to pods
How Service connects to a Pod in Kubernetes?
Pods have labels field in form of key:value pairs (app: nginx)
Service have selectors in form of key:values (app: nginx)
Service looks for matching key-value pair among pods
Service can be of different types
Types of Service:
Service is exposed to internal to Kubernetes Cluster
Service would be exposed to outside world(browser). We can choose which port to expose. (Specify nodeport: 30080)
Service is exposed to outside world using a Loadblancer of Cloud provider (AWS, GCP).
It does not have selectors and uses DNS names instead
View it at Youtube