I hav a StatefulSet of 3
replicas of ejabberd. I have exposed them to GCP NEG using the following declaration:
apiVersion: v1
kind: Service
metadata:
name: ejabberd
annotations:
cloud.google.com/neg: '{"exposed_ports": {"5222":{"name": "ejabberd-xmpp-production-neg"}, "5443":{"name": "ejabberd-http-production-neg"}}}'
spec:
type: ClusterIP
clusterIP: None
selector:
app: ejabberd
ports:
- protocol: TCP
name: xmpp
port: 5222
targetPort: 5222
- protocol: TCP
name: http
port: 5443
targetPort: 5443
The health check is an HTTP endpoint at port 5443 that return HTTP 200 (OK) status code at path /
.
The issue is that when i create a SSL Proxy the health check always fail but when i ssh into the pods and execute $ curl localhost:5443/
i get a success response. TCP health checks didn't work either.