Recap: Expert Session -- Application Design on Kubernetes

The Expert Session on Application Design on Kubernetes covered practical patterns for building and running applications on Kubernetes. Here are the key takeaways:

Container Design

Use multi-stage builds to create thin container images -- smaller images mean faster pulls during pod scaling and recreation.

Resource Management

Define resource requests and limits in your YAML configs. Requests ensure proper scheduling; limits prevent out-of-memory kills.

Lifecycle Probes

  • Liveness Probes: Detect dead containers and trigger restarts.

  • Readiness Probes: Gate traffic until dependencies (like databases) are available.

  • Startup Probes: Give slow-starting apps a buffer before liveness checks kick in.

Configs and Secrets

Externalize configuration using ConfigMaps (non-sensitive) and Secrets (sensitive data). Mount them as volumes for better scalability and security. Remember: Secrets need encryption at rest to be truly secure.

State Management

  • Stateless apps: Use Deployments -- pods are ephemeral and replaceable.

  • Stateful apps: Use StatefulSets -- pods get sticky identity and persistent storage (essential for databases).

Graceful Shutdowns

Use termination grace periods and pre-stop hooks to let applications finish pending work and save data before termination.

12-Factor App on Kubernetes

The session mapped the 12-Factor methodology -- codebase separation, dependency isolation, externalized config, disposability -- to Kubernetes features.

The session wrapped up with an interactive quiz and Q&A.

Recording: https://drive.google.com/file/d/1bsKaXRYoN_oEYyQIT9ve4GITi8IKY6RY/view?usp=sharing