Three Deployments in caverns-8tinqw. None is healthy, and every image is correct. The faults are in what each container is given.
kubectl get deploy,pods,svc -n caverns-8tinqwDeployment symptom source of truth
market-api CrashLoopBackOff Secret db-creds, key name
market-api 0/2 READY, no endpoints readinessProbe.httpGet.port
market-web RESTARTS rising livenessProbe.httpGet.path
market-worker OOMKilled / 137 resources.limits.memory
market-worker queue backend: memory:// ConfigMap market-config, key name
all three QoS BestEffort resources.requestsFix them in any order.
market-api
kubectl logs deploy/market-api names a variable the container cannot find. It comes from Secret db-creds. Compare the key in env[0].valueFrom.secretKeyRef with the keys in kubectl get secret db-creds -o yaml. Delete the Secret and create it with the URL under the right key (password s3cret).
The readiness probe dials port 9090 and fails after one miss. The container listens on 8080. Apply the Deployment with the probe on port 8080 and keep the secretKeyRef env. The new rollout also makes the Pods read the fixed Secret.
market-web
kubectl describe pod shows the Liveness: line and Unhealthy events with a 404. nginx serves /. Apply the Deployment with the probe on /.
market-worker
Last State shows OOMKilled. Its working set is about 96Mi. Raise the limit with kubectl set resources and set a memory request.
The worker reads QUEUE_URL from ConfigMap market-config, which stores the value under a different key. Recreate the ConfigMap with QUEUE_URL (keep MARKET_NAME) and restart the worker.
Requests on every Deployment
No Pod may be BestEffort. Set CPU and memory requests on market-web, market-api and market-worker:
kubectl set resources deploy/market-web -n caverns-8tinqw --requests=cpu=50m,memory=32Mi --limits=memory=64Mi
kubectl get pods -n caverns-8tinqw -o jsonpath='{range .items[*]}{.metadata.name} {.status.qosClass}{"\n"}{end}'Keep the worker's memory limit at 128Mi or more.
The last objective is a question: which probe failure removes a Pod from a Service without restarting it?