Frequently Asked Question

Hi Kubernetes Learners!
We received some questions from learners currently taking A Practical Guide to Kubernetes. The Author has provided answers that might be beneficial for all of you. We are posting them here.

Question: Suppose a pod is processing a request and it is terminated. Then what happens to the request? Who is responsible to return the response of request? -Related to Operating ReplicaSets

Answer: When Kubernetes decides to stop a Pod (e.g., during upgrades) it sends a SigTerm signal to the main process (your application). It is the responsibility of your application to receive that signal and respond back with OK. Normally, after receiving it, your application would finish processing all the pending requests and then respond with OK. Also, before SigTerm is sent, Kubernetes will stop forwarding new requests to that Pod.

Question: Do we use the Nodeport to access pods from internet? -Related to Creating Services by Exposing Ports

Answer: There are more details about NodePort, but you will not use it much. In most cases, NodePort is used to expose Ingress to the outside world, and Ingress is in charge of forwarding requests from outside to your apps. More info and hands-on exercises with Ingress are in latter parts of the course.