Kubernetes
Hard
Concepts
Every container in a pod sets CPU and memory limits but no requests. What QoS class does the pod get?
Select your answer:
Show answer and explanation
Answer: Guaranteed
Explanation
When a container sets a limit but no request, Kubernetes sets the request equal to the limit. Every container then has CPU and memory requests equal to its limits, which is the rule for Guaranteed. If any container lacked a CPU or memory limit, the pod would be Burstable. A pod with no requests or limits at all is BestEffort.
More hard Kubernetes questions
- A container keeps trying to use more CPU than its CPU limit. What happens?
- A pod was scheduled using a requiredDuringSchedulingIgnoredDuringExecution node affinity rule. Later someone removes the matching label from the node. What happens to the pod?
- A node gets a NoExecute taint. A pod already running on it tolerates the taint with tolerationSeconds: 300. What happens?
- What does a DNS lookup of a headless Service (clusterIP: None) with a selector return?
- What does externalTrafficPolicy: Local do on a NodePort or LoadBalancer Service?
- In a NetworkPolicy ingress rule, what is the difference between putting namespaceSelector and podSelector in the same 'from' entry and putting them in two separate entries?