Skip to content

Instantly share code, notes, and snippets.

@venkube
Created June 15, 2024 08:55
Show Gist options
  • Save venkube/90d45fb8a41816b53904b511f8098508 to your computer and use it in GitHub Desktop.
Save venkube/90d45fb8a41816b53904b511f8098508 to your computer and use it in GitHub Desktop.
kubernetes-probes.yaml
apiVersion: v1
kind: Pod
metadata:
labels:
app: k8sprobe
name: k8sprobe-pod
spec:
containers:
- name: k8sprobe
image: nginx
ports:
- containerPort: 8080
livenessProbe:
httpGet:
path: /
port: 80
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 4
successThreshold: 1
failureThreshold: 3
startupProbe:
exec:
command:
- "ls"
- "/bin"
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 4
successThreshold: 1
failureThreshold: 3
readinessProbe:
exec:
command:
- cat
- /usr/share/nginx/html/index.html
initialDelaySeconds: 10
periodSeconds: 5
timeoutSeconds: 4
successThreshold: 1
failureThreshold: 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment