Skip to content

Files

Latest commit

764b5b4 · Mar 21, 2022

History

History
64 lines (57 loc) · 2.17 KB

ingress-controller-add-health-probes.md

File metadata and controls

64 lines (57 loc) · 2.17 KB
title description services author ms.service ms.topic ms.date ms.author
Add health probes to your AKS pods
This article provides information on how to add health probes (readiness and/or liveness) to AKS pods with an Application Gateway.
application-gateway
caya
application-gateway
how-to
11/4/2019
caya

Add Health Probes to your service

By default, Ingress controller will provision an HTTP GET probe for the exposed pods. The probe properties can be customized by adding a Readiness or Liveness Probe to your deployment/pod spec.

With readinessProbe or livenessProbe

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: aspnetapp
spec:
  replicas: 3
  template:
    metadata:
      labels:
        service: site
    spec:
      containers:
      - name: aspnetapp
        image: mcr.microsoft.com/dotnet/core/samples:aspnetapp
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 80
        readinessProbe:
          httpGet:
            path: /
            port: 80
          periodSeconds: 3
          timeoutSeconds: 1

Kubernetes API Reference:

Note

  • readinessProbe and livenessProbe are supported when configured with httpGet.
  • Probing on a port other than the one exposed on the pod is currently not supported.
  • HttpHeaders, InitialDelaySeconds, SuccessThreshold are not supported.

Without readinessProbe or livenessProbe

If the above probes are not provided, then Ingress Controller make an assumption that the service is reachable on Path specified for backend-path-prefix annotation or the path specified in the ingress definition for the service.

Default Values for Health Probe

For any property that can not be inferred by the readiness/liveness probe, Default values are set.

Application Gateway Probe Property Default Value
Path /
Host localhost
Protocol HTTP
Timeout 30
Interval 30
UnhealthyThreshold 3