Skip to content

healthcheck

Feature state: 0.6.0

healthcheck value in Kubedeploy can be used to define custom liveness, readiness and startup Probes for main container.

Note

By default healthcheck in Kubedeploy is configured with auto-detect. If ports have defined a port named http, Kubedeploy will automatically define httpCheck liveness and readiness probes on base URL.

automatic probes on main container
      livenessProbe:
        httpGet:
          path: /
          port: http
      readinessProbe:
        httpGet:
          path: /
          port: http

When defining custom healthcheck probes any automatic probes will be disabled.

Define custom healthcheck probes

values.yaml
nameOverride: my-app
image:
  repository: nginx
  tag: latest

ports:
  - name: liveness-port
    containerPort: 8080
    protocol: TCP

healthcheck:
  enabled: true
  probes:
    livenessProbe:
      httpGet:
        path: /healthz
        port: liveness-port
      failureThreshold: 5
      periodSeconds: 10
    readinessProbe:
      httpGet:
        path: /healthz
        port: liveness-port
      failureThreshold: 1
      periodSeconds: 10
    startupProbe:
      httpGet:
        path: /healthz
        port: liveness-port
      failureThreshold: 30
      periodSeconds: 10
Deploy command
helm install webapp sysbee/kubedeploy -f values.yaml

If you wish to disable automatic probes without configuring custom probes (Feature state: 0.8.2):

Disable automatic healthcheck probes

values.yaml
1
2
3
4
5
6
7
nameOverride: my-app
image:
  repository: nginx
  tag: latest

healthcheck:
  disableAutomatic: true
Deploy command
helm install webapp sysbee/kubedeploy -f values.yaml

Note

For more complete example of configuring healthcheck probes with other configurable values, please see the Best practices linked page.

See also: