K8s Probes - philipf/notebook GitHub Wiki

Liveness and Readiness Probes

livenessProbe with an exec command

spec:
  containers:
  - name: <container-name>
  image: <image-name>
  livenessProbe:
    exec:
      command:
      - echo
      - testing
    initialDelaySeconds: 5
    periodSeconds: 5

readinessProbe with a get command

spec:
  containers:
  - name: myapp-container
  image: nginx
  readinessProbe:
    httpGet:
      path: /
      port: 80
    initialDelaySeconds: 5
    periodSeconds: 5
⚠️ **GitHub.com Fallback** ⚠️