k8s health check

There are two probe used for k8s pod health check 

1 liveness check,  check if the pod is running 

2 readiness check, verify if the pod has started , once it is passed it will direct traffic to the pod 

 

There are 3 ways to send porbe 

1) http request to a predefined path, check if return code is within 200 or 300 range 

2) run a command check the retrun value is 0 or not 

3) tcp check, verify if the a port is open and can serve tcp connection

 

Probe period, failure probe request, etc can be configured

Initial delay need to be added when you setup the probe, it is needed becase some pod may take time to start running. 

posted @ 2021-02-24 06:12  anyu686  阅读(63)  评论(0编辑  收藏  举报