K8s Probe Generator
Runs in browserGenerate Kubernetes liveness, readiness, and startup probes
Container
How to Use
Configure Liveness, Readiness, and Startup probes.
You will see:
- Generated YAML Config
- Best Practice Tips
- One-click Copy
apiVersion: v1
kind: Pod
metadata:
name: app-pod
labels:
app: app
spec:
containers:
- name: app
image: nginx:latest
ports:
- containerPort: 8080
livenessProbe:
httpGet:
path: /healthz
port: 8080
initialDelaySeconds: 15
periodSeconds: 20
timeoutSeconds: 1
successThreshold: 1
failureThreshold: 3
readinessProbe:
httpGet:
path: /ready
port: 8080
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 1
successThreshold: 1
failureThreshold: 3
Impact Analysis
About Kubernetes Health Probes
Kubernetes probes are health checks that determine if a container is running correctly and ready to receive traffic. Properly configured probes are essential for reliable deployments and self-healing applications.
Types of Probes
Liveness Probe
Checks if the container is alive. If it fails, Kubernetes restarts the container. Use for detecting deadlocks or hung processes.
Readiness Probe
Checks if the container can accept traffic. If it fails, the pod is removed from service endpoints. Use during startup or when temporarily overloaded.
Startup Probe
Checks if the application has started. Disables liveness/readiness checks until it succeeds. Use for slow-starting containers.
Probe Mechanisms
- httpGet
- HTTP request to endpoint — success if 2xx/3xx
- tcpSocket
- TCP connection to port — success if port is open
- exec
- Run command in container — success if exit code 0
- grpc
- gRPC health check — for gRPC services
Key Parameters
- initialDelaySeconds
- Wait before first probe (default: 0)
- periodSeconds
- How often to probe (default: 10)
- timeoutSeconds
- Probe timeout (default: 1)
- failureThreshold
- Failures before action (default: 3)
- successThreshold
- Successes to mark healthy (default: 1)
⚠️ Common Mistakes
- Same probe for liveness and readiness: They serve different purposes
- Too aggressive timeouts: Causes unnecessary restarts
- Missing initialDelaySeconds: Probe fails before app starts
- Heavy probe endpoints: Don't do database queries in probes
💡 Pro Tips
- Use startup probe for slow-starting apps instead of high initialDelaySeconds
- Keep probe endpoints lightweight — just check if app is responsive
- Readiness probe should check external dependencies; liveness should not
- Test probes thoroughly before production deployment
References & Further Reading
- Kubernetes Docs: Configure Probes - Official documentation.
- Google Cloud Blog: Best Practices - Setting up health checks.