How to disable liveness and readiness probe for pods ? [Video]

How to disable liveness and readiness probe for pods ? [Video]

AuthorFullName__c
Matthew Wang
articleNumber
000005025
ft:sourceType
Salesforce
FirstPublishedDate
2021-04-14T09:07:50Z
lastModifiedDate
2023-01-22T11:08:14Z
VersionNumber
4



You can disable the liveness and readiness probe for pods, so that it will stop crashing and restarting. Doing this will let you "exec" into the pod to take a look around or perform some tests as needed. 

Each micro service in a Jfrog application has a configurable liveness or readiness probe that you can disable. Third party external tools such as RabbitMQ or Postgres for Xray should have their own liveness/readiness probes in the base chart.

For example, the probes for Artifactory can be found at:

https://github.com/jfrog/charts/blob/master/stable/artifactory-ha/values.yaml#L618

Xray's rabbitmq uses Bitnami's chart, so the probes can be configured as seen https://github.com/bitnami/charts/blob/master/bitnami/rabbitmq/values.yaml#L461

In Xray's values.yaml, it would be under rabbitmq.livenessProbe
 
You can run a "helm upgrade" after modifying the values.yaml to disable the probes. Alternatively, you can modify the stateful set for a running pod so that the probes never fail. You can do this by editing the stateful set for a pod. For example, for artifactory, you can run "kubectl edit statefulset <statefulset name>", and  set the probes like the below:

livenessProbe:
          exec:
            command:
            - ls
          failureThreshold: 10
          initialDelaySeconds: 180
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 10


As usual, you should still take a look at the pod logs with "kubectl logs" and run "kubectl describe" on the pod as these two commands may tell you why the pods are crashing.