Created
July 16, 2022 09:09
-
-
Save a-patel/dd34f123ed4749fd75f2dfb24f2c9120 to your computer and use it in GitHub Desktop.
Kubernetes - Probes (Liveness, Readiness, and Startup) Overview
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Pod | |
metadata: | |
labels: | |
app: myapp | |
name: myapp | |
spec: | |
containers: | |
- name: myapp | |
image: k8s.gcr.io/myapp | |
livenessProbe: | |
httpGet: | |
path: /healthz | |
port: 8080 | |
httpHeaders: # optional | |
- name: Custom-Header | |
value: Awesome | |
initialDelaySeconds: 3 | |
periodSeconds: 3 | |
readinessProbe: | |
tcpSocket: | |
port: 8080 | |
initialDelaySeconds: 5 | |
periodSeconds: 10 | |
startupProbe: | |
httpGet: | |
path: /healthz | |
port: 8080 | |
# port: liveness-port, # way-2: for apply to all probes types | |
failureThreshold: 30 | |
periodSeconds: 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment