Two Deployments run in caverns-yz2d4z. One is not healthy:
sh
kubectl get pods -n caverns-yz2d4zDescribe the API Pod and read the container section:
sh
kubectl describe pod <market-api-pod> -n caverns-yz2d4ztext
State: Waiting
Reason: CrashLoopBackOff
Last State: Terminated
Reason: OOMKilled
Exit Code: 137
Limits:
memory: 32MiThe same two facts, without scrolling:
sh
kubectl get pod <market-api-pod> -n caverns-yz2d4z -o jsonpath='{.status.containerStatuses[0].lastState.terminated.reason}'
kubectl get pod <market-api-pod> -n caverns-yz2d4z -o jsonpath='{.status.containerStatuses[0].lastState.terminated.exitCode}'Raise the limit
The API needs about 64Mi. Give it room and a request the scheduler can plan with:
sh
kubectl set resources deploy/market-api -n caverns-yz2d4z --limits=memory=128Mi --requests=memory=64Mi
kubectl get deploy market-api -n caverns-yz2d4zA new ReplicaSet rolls out; the new Pod stays Running.
Who uses the memory
sh
kubectl top pods -n caverns-yz2d4zThe MEMORY(bytes) column answers the last objective.