A demonstration environment for investigating and resolving Kubernetes pod crashes in a microservice deployment.
This demo deploys a payment processing microservice that fails to start properly in Kubernetes, resulting in a CrashLoopBackoff state. This represents a common production scenario where application pods repeatedly crash during startup.
- Docker (with Kubernetes enabled) or kind
- kubectl
- A running Kubernetes cluster
Deploy the demo environment:
make scenario-crashloopThis will create the scenario-crashloop namespace and deploy all resources.
Check the deployment status:
kubectl get pods -n scenario-crashloopYou should observe pods in CrashLoopBackoff state. Use standard Kubernetes troubleshooting techniques to investigate:
# View pod details
kubectl describe pod -n scenario-crashloop <pod-name>
# Check logs
kubectl logs -n scenario-crashloop <pod-name>
# View previous container logs if available
kubectl logs -n scenario-crashloop <pod-name> --previousThe demo consists of:
- payment-service: A Node.js microservice handling payment processing
- ConfigMap: Application configuration
- Secret: Sensitive credentials
- Service: Internal cluster networking
To clean up and reset the demo:
kubectl delete ns scenario-crashloopThen redeploy with make scenario-crashloop.
In a working state, the payment service should:
- Start successfully
- Respond to health check requests
- Process payment requests via REST API
- Connect to required backend services
Currently, the pods are failing to start. Investigate the logs and configuration to determine the root cause.