market-api in vitals-z1ly8s has two Pods and a Service in front of them:
sh
kubectl get pods,svc -n vitals-z1ly8s
kubectl exec client -n vitals-z1ly8s -- wget -qO- market-api:8080/healthzThe fetch fails. Look at READY, then at the Service's endpoints and the Pod's Events:
sh
kubectl describe svc market-api -n vitals-z1ly8s
kubectl describe pod -l app=market-api -n vitals-z1ly8sThe readiness probe asks a port the API does not listen on. Apply the Deployment again with the probe on port 8080:
sh
kubectl apply -n vitals-z1ly8s -f - <<EOF
apiVersion: apps/v1
kind: Deployment
metadata:
name: market-api
spec:
replicas: 2
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
EOF