A stateless system does not retain client-specific state between requests or depend on persistent session state across restarts. Its environment can be recreated after the running machine or container is destroyed. section 5.1.4
Recreating a container environment
A Python or Node.js application remains stateless when its environment can be rebuilt from requirements.txt or package.json. By contrast, installing NGINX interactively inside an Ubuntu container does not persist after the container is removed with --rm. section 5.1.4 section 5.1.4
docker run --rm -it ubuntu /bin/bashcat /etc/nginx/sites-available/defaultnginx -vexit
Use the commands to observe that an interactively modified container loses its NGINX installation when recreated. section 5.1.4
Deploy stateless applications by:
- Rebuilding the application environment from its dependency files instead of modifying a running container manually. section 5.1.4
- Using a Kubernetes Deployment for the running containers. section 8.5
- Providing configuration through ConfigMaps and routing external traffic through a load-balancing Service. section 8.5













