I have created a Service with a static Endpoint that points to two public IP addresses (A.B.C.D and X.Y.V.Z).
apiVersion: v1
kind: Service
metadata:
name: web-app
spec:
ports:
- protocol: TCP
port: 80
targetPort: 80
---
apiVersion: v1
kind: Endpoints
metadata:
name: web-app
subsets:
- addresses:
- ip: A.B.C.D
- ip: X.Y.V.Z
ports:
- port: 80
Is there a health check for these IP addresses by default, what if one of the IP addresses goes down?
If there is no pre-built health check, how do I configure it?
As per this feature request in official kubernetes repo and the comment written by Vllry,
Kubernetes doesn’t have built-in functionality to monitor the endpoints. If you need to monitor these endpoints you can use some other tools like servicemesh or external monitoring tools.