This chapter sets the stage for Kubernetes by grounding readers in the fundamentals of deploying software. Rather than reciting history, it builds a declarative mindset—stating what you want, not how to do it—using reusable manifests and configuration files. With a focus on cloud-based, internet-facing apps and an assumed baseline in Python or JavaScript, it argues that software creates value only when deployed and that mastering the basics is the shortest road to confidently using Kubernetes.
The road maps a practical sequence: write simple Python and JavaScript web apps; place all work under Git; add automation for integration and delivery; package code and dependencies into container images with Dockerfiles; push images to a registry; and perform container-based deployments. This exposes both the power and limits of raw containers—managing upgrades, scaling beyond a few services, failure recovery, and service-to-service communication—prompting the move to automated orchestration. Kubernetes addresses scheduling, scaling, rollouts, and resilience, but introduces its own hurdles, from installation and frequent updates to configuration sprawl, CI/CD and RBAC integration, security, storage, networking, and the added complexity of stateful workloads.
To bridge that gap, the book takes a step-by-step, skill-stacking approach: manual deployment to reveal what automation must do, container deployment to gain portability and dependency isolation, and finally Kubernetes deployment to operationalize scale and reliability. Along the way it demystifies containers (build, share, run), emphasizes understanding dependencies and portability to avoid lock-in, and surfaces common pitfalls such as subtle build/run failures and graceful upgrades. By leaning on managed Kubernetes and practical workflows, the goal is to make modern deployment approachable so you can iteratively ship, observe, and improve production-grade applications with confidence.
Declare to Kubernetes to deploy
Code path to Kubernetes
Summary
Deployment can be complex, but anyone can do it.
For continuous updates, we need an automated pipeline for deployment.
Python and JavaScript apps are among the easiest web applications to deploy.
App dependencies may or may not be obvious when first deploying.
Containers help isolate our apps for sharing and running.
More servers, not more robust ones, are often the solution for handling traffic increases.
Adding more containerized applications becomes increasingly difficult.
Kubernetes reduces complexity by managing the deployment of containers while distributing compute resources effectively.
FAQ
Who should read this chapter, and what background is expected?Readers with at least a beginner-level coding background. You should be comfortable with concepts like functions, classes, variables, and basic string handling. If those are new, consider a beginner OOP course in Python or JavaScript first. The book uses both Python and JavaScript in its examples.What does “declarative” mean for Docker and Kubernetes?Declarative tools let you state the desired outcome (for example: which app to run, which language/version, which ports, which domain, who can access it) and the system figures out how to achieve it. In Kubernetes, these instructions live in Manifests; in Docker, they live in Dockerfiles. Many other tools (NGINX/Apache, Ansible, Terraform) also use declarative files.What is the “road to Kubernetes” outlined in the chapter?
- Build two simple web apps (Python and JavaScript) to deploy and iterate on.
- Use Git and GitHub to version, share, and automate changes (GitHub Actions).
- Containerize the apps; push images to a container registry.
- Try container-based deployments to see their benefits and limits.
- Add orchestration with Kubernetes to handle scaling, upgrades, and resilience (using a managed service to simplify setup).Where can software be deployed, and what scope does this book focus on?Software can run on personal devices, in the cloud (AWS, GCP, Azure, etc.), on on-prem servers, or in hybrid setups. This book focuses on cloud-based, internet-facing deployments, while emphasizing principles you can apply elsewhere.What are dependencies, and why do they complicate deployment?Dependencies are everything your software needs to build and run correctly. They include:
- Operating system requirements
- Language/runtime versions
- App/framework requirements
- Third-party system packages and libraries
- Hardware needs (CPU, RAM, GPU, network)
Coordinating these consistently across machines is a key deployment challenge.What do containers actually do?Containers bundle your app with its dependencies into a portable image that can run consistently across many environments. You build an image (often from a Dockerfile), push it to a registry to share, and run it with a container runtime. Containers work well for a wide range of open-source software, from languages and web servers to databases and message queues.What challenges arise when using containers without orchestration?
- Upgrading or rolling back container versions gracefully
- Managing more than a few containers at once
- Scaling to handle changing traffic
- Failure detection and recovery
- Service-to-service communication
Even successful builds can fail at runtime, and updates can require downtime without additional tooling.Why introduce Kubernetes—what problems does it solve?Kubernetes adds automated orchestration: scheduling containers across nodes, scaling up/down, rolling updates and rollbacks, service discovery and networking, and self-healing. It addresses the operational pain of multi-container management, upgrades, resilience, and traffic handling.What are the fundamental challenges with adopting Kubernetes?
- Installing and updating clusters (often eased by managed services)
- Configuration overload for even a single app
- Handling stateful workloads vs. inherently stateless containers
- Security and permissions (RBAC)
- Cross-service networking and policies
- Persistent storage
- Recovery and debugging at cluster scale
The chapter recommends managed Kubernetes and CI/CD with proper access controls.How will this book teach deployment, and why start manually?You’ll deploy two production-grade web apps through three stages: manual, container-based, and Kubernetes. Each stage builds on the last. Starting manually gives you the context behind automation so you can troubleshoot when things break. You’ll use Git, GitHub, and GitHub Actions to implement CI/CD and evolve toward reliable, repeatable deployments. Demos are available at https://github.com/roadtokubernetes.
pro $24.99 per month
access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!