K8s Service
- When upgrading to newer versions of Pods ensure right set of labels are present on k8s service selector
Health Checks/Probes for containers in k8s Pods
- Refer Here for official docs
- K8s supports 3 kinds of checks
- liveness probe: if this check fails kuberenetes will restart the container.
- readiness probe: if this check fails the pod will be removed from service (pod will not get requests from service)
- startup probe: This checks for startup and until startup is ok, the other checks will be paused.
- Probes or checks can be performed by
- exec: run any linux/windows command which returns status/exit code.
- http: we send http request to the application. based on status codes we can decide Refer Here
- grpc: This communicates over grpc
- tcp: send tcp request
- Refer Here for the manifests with health checks
Run Pods with specific Resources (CPU/Memory)
- Refer Here for the official docs on Resource Limits
- Refer Here for the manifests with requests and limits
Container Types in Pods
- We have 3 types of containers
- containers: these are why we write pod spec
- init containers: Refer Here
- ephemeral containers
Init Containers
- Refer Here for the manifests added
Ephemeral Containers
- Refer Here for official docs
Node Usecases
- How to schedule a Pod on a Particular node
- How to stop assigning more pods to a node
- How to move all the pods running a node to other ndoe
