Three faults in caverns-lnqssj. Start with the overview:
sh
kubectl get deploy,svc,pods -n caverns-lnqssj1. The API has no endpoints
market-api runs but shows 0/1 READY, and its Service has Endpoints: <none>:
sh
kubectl describe svc market-api -n caverns-lnqssj
kubectl describe pod <market-api-pod> -n caverns-lnqssjThe Readiness: line shows the port the probe dials. The container listens on 8080. Apply the Deployment with the probe on the right port:
sh
kubectl apply -n caverns-lnqssj -f - <<EOF
apiVersion: apps/v1
kind: Deployment
metadata:
name: market-api
spec:
replicas: 1
selector:
matchLabels:
app: market-api
template:
metadata:
labels:
app: market-api
spec:
containers:
- name: api
image: stackmonsters/monster-market-api
ports:
- containerPort: 8080
readinessProbe:
httpGet:
path: /healthz
port: 8080
periodSeconds: 2
EOF2. The cache is BestEffort
sh
kubectl get pod -n caverns-lnqssj -l app=cache -o jsonpath='{.items[0].status.qosClass}'Make it Guaranteed: requests equal to limits for both CPU and memory.
sh
kubectl set resources deploy/cache -n caverns-lnqssj --requests=cpu=100m,memory=64Mi --limits=cpu=100m,memory=64MiCheck the new Pod's class.
3. The worker's key was renamed
The worker reads QUEUE_URL from market-config:
sh
kubectl get deploy market-worker -n caverns-lnqssj -o jsonpath='{.spec.template.spec.containers[0].env[0].valueFrom.configMapKeyRef}'
kubectl get configmap market-config -n caverns-lnqssj -o yamlThe ConfigMap has the value under a different key. Recreate it with QUEUE_URL and restart the worker so it reads it:
sh
kubectl delete configmap market-config -n caverns-lnqssj
kubectl create configmap market-config -n caverns-lnqssj --from-literal=QUEUE_URL=amqp://market-queue:5672/jobs
kubectl rollout restart deploy/market-worker -n caverns-lnqssj
kubectl logs deploy/market-worker -n caverns-lnqssjThe log line queue backend: should show the URL, not memory://.