How to put two prots in "livenessProbe"?

1/21/2020

My legacy server listens on two TCP ports. I want to put livenessProbe and readinessProbe on two ports. For single port it looks like the following. How to do it for 2 ports ?

        livenessProbe:
        tcpSocket:
         port: 15772
        initialDelaySeconds: 10
        periodSeconds: 5
        failureThreshold: 5
      readinessProbe:
        tcpSocket:
          port: 15772
        initialDelaySeconds: 10
        periodSeconds: 5
        timeoutSeconds: 5
-- Chandu
kubernetes
probe

1 Answer

1/21/2020

Kubernetes pod object will not allow to keep more than one liveness and readiness probe per container. if the pod contains multiple containers, you can define multiple liveness/readiness probes for every containers.

-- Subramanian Manickam
Source: StackOverflow