Home > Blockchain >  Is readinessprobe used amidst rolling deployment?
Is readinessprobe used amidst rolling deployment?

Time:10-04

In the below yaml syntax:

      readinessProbe:
        httpGet:
          path: /index.html
          port: 80
        initialDelaySeconds: 3
        timeoutSeconds: 3
        periodSeconds: 10
        failureThreshold: 3

Readiness probe is used during initial deployments of Pod.

  1. For rolling out new version of application, using rolling deployment strategy, Is readiness probe used for rolling deployment?

  2. path & port field allows to input url & port number of a specific service, but not dependent service. how to verify, if dependent service is also ready?

CodePudding user response:

using rolling deployment strategy, Is readiness probe used for rolling deployment?

Yes, the new version of Pods is rolled out and older Pods are not terminated until the new version has Pods in ready state.

E.g. if you roll out a new version, that has a bug so that the Pods does not become ready - the old Pods will still be running and the traffic is only routed to the ready old Pods.

Also, if you don't specify a readinessProbe, the process status is used, e.g. a process that terminates will not be seen as ready.

how to verify, if dependent service is also ready?

You can configure a custom readinessProbe, e.g. a http-endpoint on /healtz and it is up to you what logic you want to use in the implementation of that endpoint. A http response code of 2xx is seen as ready.

  • Related