Skip to content

pkillianjackson/crashloop-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kubernetes CrashLoopBackoff Demo

A demonstration environment for investigating and resolving Kubernetes pod crashes in a microservice deployment.

Overview

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.

Prerequisites

  • Docker (with Kubernetes enabled) or kind
  • kubectl
  • A running Kubernetes cluster

Setup

Deploy the demo environment:

make scenario-crashloop

This will create the scenario-crashloop namespace and deploy all resources.

Investigating the Issue

Check the deployment status:

kubectl get pods -n scenario-crashloop

You 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> --previous

Architecture

The demo consists of:

  • payment-service: A Node.js microservice handling payment processing
  • ConfigMap: Application configuration
  • Secret: Sensitive credentials
  • Service: Internal cluster networking

Reset

To clean up and reset the demo:

kubectl delete ns scenario-crashloop

Then redeploy with make scenario-crashloop.

Expected Behavior

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors