Kubernetes liveness probes with query string parameters

后端 未结 3 962
北海茫月
北海茫月 2021-01-13 05:15

I\'ve looked over the documentation and browsed the source, but I can\'t seem to figure out how to do this. Is there any way to send query string parameters along with the p

3条回答
  •  再見小時候
    2021-01-13 06:00

    EDIT: This should now be fixed in Kubernetes 1.3. Thanks to Rudi C for pointing that out.

    Liveness probes in Kubernetes v1.2 don't support passing query parameters.

    This Issue in the Deis Controller repo has a good explanation. The gist is that the LivenessProbe.HttpGet.Path is treated as a true URL path (which needs the "?" to be escaped as "%3f").

    I've opened a feature request Issue against Kubernetes to discuss adding query parameter(s).

    As a workaround, you could use an exec livenessProbe that included the query parameters (as long as your container includes something like wget or curl):

    livenessProbe:
      exec:
        command:
        - wget
        - /api/v1?q=...
    

提交回复
热议问题