vitals-vyidnj runs the whole Monster Market and none of it is healthy. The manifests are in ~/vitals-vyidnj/. Start with the overview:
sh
kubectl get deploy,pods,hpa -n vitals-vyidnj
ls ~/vitals-vyidnjtext
market-web restarts every few seconds
market-api Running, never Ready
market-worker Pending
market-db CrashLoopBackOff
hpa market-web TARGETS <unknown>/50%Each one is a different lesson. For each, read before you change: describe pod, Events, Last State, the node's Allocated resources.
Work through them
- web: the liveness probe asks nginx for a path it does not serve. Fix the path in
web.yamland apply it. The HPA also needs something from this Deployment: a CPU request. Addresources.requests.cpu: 100mto the container while you are in the file. - api: the readiness probe asks the wrong port. Fix it in
api.yaml. - worker: it asks for more CPU than the node has left.
describe podnames the resource. Lower the request to something the API and web tiers leave room for;kubectl set resourcesis quickest. - db: its memory limit is below what postgres needs.
Last Statetells you how it died. Raise the limit to 256Mi or more, with a request to match.
Edit a file with sed -i or vim, then kubectl apply -f ~/vitals-vyidnj/<file>. A Deployment rolls out the change on its own.
When you are done
sh
kubectl get deploy,hpa -n vitals-vyidnj
kubectl describe hpa market-web -n vitals-vyidnjEvery Deployment at its replica count, READY equal to it, and the HPA showing a real percentage. The last objective is a question about the difference between two probes.