In straits-6vlys2 the API has a Service, endpoints, and no answers:
sh
kubectl exec client -n straits-6vlys2 -- wget -qO- market-api:8080/healthz
kubectl describe svc market-api -n straits-6vlys2Read TargetPort:. The container listens on 8080. Apply the Service again, corrected:
sh
kubectl apply -n straits-6vlys2 -f - <<EOF
apiVersion: v1
kind: Service
metadata:
name: market-api
spec:
selector:
app: market-api
ports:
- port: 8080
targetPort: 8080
EOFThe web Deployment names its container port http. Give it a Service that targets the name:
sh
kubectl apply -n straits-6vlys2 -f - <<EOF
apiVersion: v1
kind: Service
metadata:
name: market-web
spec:
selector:
app: market-web
ports:
- port: 80
targetPort: http
EOF