How to do kubernetes TCP health checks on a container?

1/16/2017

I can't find the syntax on how to do it. How can I do TCP health checks on containers inside a pod?

-- Hyperfocus1337
kubernetes

1 Answer

1/16/2017

You can do it with the tcpSocket definition:

livenessProbe:
  tcpSocket:
    port: 9000
  initialDelaySeconds: 120
  timeoutSeconds: 5
readinessProbe:
  tcpSocket:
    port: 9000
  initialDelaySeconds: 120
  timeoutSeconds: 5
-- Hyperfocus1337
Source: StackOverflow