Home > Mobile >  How to add readiness probe for snapshot-controller Deployment
How to add readiness probe for snapshot-controller Deployment

Time:08-25

I am trying to add livenessprobe for snapshot-controller. snapshot-controller deployment mentioned here to be specific. I tried to exec into controller pod to see what can be used for liveness probe. But not able to get into the pod. Has someone tried adding probes for snapshot-controller.

CodePudding user response:

In the github repository you shared: https://github.com/kubernetes-csi/external-snapshotter/tree/v6.0.1#snapshot-controller-command-line-options

Important optional arguments that are highly recommended to be used

--http-endpoint: The TCP network address where the HTTP server for diagnostics, including metrics and leader election health check, will listen (example: :8080 which corresponds to port 8080 on local host). The default is empty string, which means the server is disabled.

You should be able to use this, if you do enable this option. At which point, you could query port 8080, path /metrics for example.

Note: if you need to troubleshoot something like this and do not have a shell in your container image. You could use kubectl debug, see: https://kubernetes.io/docs/tasks/debug/debug-application/debug-running-pod/#debugging-using-a-copy-of-the-pod

  • Related