Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4740

How to config health check of haproxy pod in a kubernetes cluster?

$
0
0

We deploy a Haproxy Pod in kubernetes cluster, and we config health check below:

"livenessProbe": {
   "exec": {
      "command": [
          "/bin/bash",
          "-c",
          "test `ps -eo stat,command | grep -v grep | grep haproxy | awk '{print $1}' | grep ^T | wc -l` == 0"
        ]
   },
   "initialDelaySeconds": 15,
   "periodSeconds": 3,
   "failureThreshold": 3,
   "timeoutSeconds": 3
}

In this way, the exec command rely on docker service and does not really check the status of haproxy service. As I know, haproxy does not open an internal port for health check in such k8s pod type.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 4740

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>