--- title: Foundations collection: docker-k8s-fundamentals author: Akash Kadlag updated: 2026-11-18 source: https://docs.chaicode.com/docker-k8s-fundamentals/foundations --- # Foundations ## **Foundations** How we got there **Foundations** This chapter is the backstory: why DevOps, CI/CD, Docker and Kubernetes exist at all. Every tool we meet tonight follows the same pattern: pain, fix, new pain. Keep that pattern in mind and the rest of the talk will feel like one story instead of a list of tools. ## Pain → Fix → New Pain Pain → Fix → New Pain Whenever a tool appears, ask one question: what was hurting before it existed? Pain: Something hurt Fix: Someone fixed it New pain: The fix **exposed** the next problem Whenever I introduce a tool tonight, ask one question: what was hurting before it existed? If you can answer that, you understand the tool. If you can't, you've only memorised it. This is the lens for the whole evening. ## The Software Development Life Cycle The Software Development Life Cycle Tonight's tools change three phases the most: **Develop, Test, Deploy**. Plan: what are we building, and why? Design: architecture, database, APIs Develop: write the code Test: prove it works Deploy: put it on servers for real users Monitor: watch it live, fix issues, feed learnings back into Plan Every feature you ship goes through this loop: Plan, Design, Develop, Test, Deploy, Monitor, and back to Plan. Tonight's tools change three phases the most: Develop, Test and Deploy. Deploy is highlighted because, as we'll see, it became the bottleneck. ## Waterfall → Agile Waterfall → Agile More releases means more deployments, and **manual** deployment can't keep up. Waterfall Each phase happens once, in order A release every 6–12 months Deploying by hand is rare enough to survive Agile Small changes Released every few weeks or days Deploying by hand, far more often First use of the pattern. Pain: slow releases, once or twice a year. Fix: Agile — small changes released every few weeks or days. New pain: every release still had to be deployed by hand, now far more often. Cut this slide if we're running late. ## Same code, four **different** machines Same code, four **different** machines Each set up by hand, by different people, at different times. We ship the exact same code to four machines — the code is identical everywhere. But each machine was set up by hand: a person installed and configured things on it. Different people did it, at different times, so no two setups are quite the same. The result: identical code sitting on four machines that quietly differ underneath. ## Wall between Dev & Ops Wall between Dev & Ops Neither side is wrong. They were measured on **opposite** goals. Developers Want to ship new features fast Throw the code over the wall to Ops "It works on my machine!" Operations Want stability, so they resist change Catch whatever lands on their side "Your code broke prod!" Developers want to ship new features fast. Operations want stability, so they resist change. Developers throw the code over the wall to Ops, and when it breaks the two sides blame each other. Neither side is wrong. They were just measured on opposite goals. ## A deployment night A deployment night Miss one step and production goes down at 2 AM. SSH into the server. Install or update the runtime — which version did we use last time? Copy the code over with FTP, scp or git pull. Edit config files by hand. Restart and hope it comes back. Then repeat for every server. Teams kept long runbook documents with these steps. Miss one step and production goes down at 2 AM. ## The problems with the old process The problems with the old process Environment drift: Servers slowly become different, so bugs appear **only** in prod Dependency conflicts: App A needs Python 3.8, app B needs 3.12, on the same server Slow onboarding: A new developer spends days setting up their laptop Problem 1, environment drift: servers slowly become different, so bugs appear only in prod. Problem 2, dependency conflicts: app A needs Python 3.8, app B needs 3.12, on the same server. Problem 3, slow onboarding: a new developer spends days setting up their laptop. Ask: which of these have you faced? Type the number. Read one or two replies. ## The problems with the old process The problems with the old process Later we'll see which of the six are still **standing**. Snowflake servers: Unique, hand-tuned servers that nobody dares touch Painful rollbacks: Undoing a release means redoing steps by hand Manual scaling: 10 servers means doing everything 10 times Problem 4, snowflake servers: unique, hand-tuned servers that nobody dares touch. Problem 5, painful rollbacks: undoing a release means redoing steps by hand. Problem 6, manual scaling: 10 servers means doing everything 10 times. Keep these six in mind. We'll come back to this exact list later and see which ones are still standing. ## Why DevOps came Why DevOps came DevOps is a culture plus practices that bring Development and Operations together to ship faster and more reliably. Shared ownership: "You build it, you run it" Automate the repeated: Build, test, deploy, infrastructure Small, frequent releases: Instead of big **risky** ones Fast feedback: Through monitoring and alerts DevOps is a culture plus practices that bring Development and Operations together to ship faster and more reliably. Shared ownership: you build it, you run it. Automate everything that's repeated: build, test, deploy, infrastructure. Small, frequent releases instead of big risky ones, and fast feedback through monitoring and alerts. DevOps is not a tool or a job title first. It's a way of working. Tools like CI/CD, Docker and Kubernetes are how we practise it. ## CI/CD CI/CD Broken code is caught in **minutes**, not on release night. Every push triggers a build automatically Tests run on every build, so broken code is caught within minutes Every passing build is packaged and ready to release Delivery: a human clicks to release. Deployment: it goes to production on its own Commit, Build, Test, Package, Deploy — automatic, on every push. CI, Continuous Integration: every push is built and tested automatically, so broken code is caught in minutes. CD, Continuous Delivery: every passing build is ready to release with one click. CD, Continuous Deployment: every passing build goes to production automatically. The two CDs differ by one thing: whether a human clicks the final button. Tools: GitHub Actions, GitLab CI, Jenkins. ## Manual release vs CI/CD Manual release vs CI/CD The release stops being an event and becomes a **non-event**. Once a month, a stressful night → Many times a day, a non-event Bugs found late → Bugs found within minutes Depends on one person's memory → Repeatable, written as code Manual release: once a month, a stressful night. CI/CD: many times a day, a non-event. Manual: bugs found late. CI/CD: bugs found within minutes. Manual: depends on one person's memory. CI/CD: repeatable, written as code. Common tools: GitHub Actions, GitLab CI, Jenkins. ## Pipeline automated but what about the **servers**? Pipeline automated but what about the **servers**? The script was the same, but the servers weren't. We automated the pipeline: every commit follows the same path — Commit, Build, Test, Package, Deploy. That part is consistent. But the servers it lands on are not. Dev, QA, Staging and Production each run a different operating system and a different Node.js version. So the same build passes in Dev, QA and Staging and fails in Production — the classic 'Works on my machine!' problem. One fix is to ship a full virtual machine with everything inside, but VMs are large and slow to start. What we really want is a small package that carries the app together with its environment — that sets up the next chapter. ## Can we ship the environment along with the code? Can we ship the environment along with the code? So the question in 2013 was not 'what's a cool new tool?' The question was: can we ship the environment along with the code, as one light package? The answer was Docker. That is where the next chapter begins. ## Nothing Here Happened Overnight Nothing Here Happened Overnight The evolution of containerization and modern infrastructure. 1979: Unix chroot, isolating a process's view of files. That is the first seed of containers. 2001: The Agile Manifesto changes how software teams build, iterate, and deliver. 2006: AWS EC2 makes computing power available on demand, by the hour. 2008: LXC brings container isolation capabilities to Linux. 1979 → Unix chroot isolates a process's view of files — the first **seed** of containers 2001 → Agile Manifesto — ship small and often, not once a year 2006 → AWS EC2 launches — virtual machines and cloud go mainstream 2008 → Linux containers (LXC) — isolation built into the Linux kernel 1979: Unix chroot, isolating a process's view of files. That is the first seed of containers. 2001: the Agile Manifesto - ship small and often, not once a year. 2006: AWS EC2 - many servers on one machine, rented by the hour. 2008: LXC puts isolation straight into the Linux kernel. Look at the gaps. Nothing here appeared overnight. ## Docker Made Containers Easy Docker Made Containers Easy 2009: Patrick Debois introduces the term DevOps, bringing development and operations closer. 2011: Jenkins gains popularity, automating software builds and testing. 2013: Docker launches, making containers easy to build, ship, and run. 2014: Google open-sources Kubernetes to orchestrate containers at scale. 2015: CNCF is founded, and Kubernetes 1.0 is released. 2009 → Patrick Debois introduces the term DevOps, bringing development and operations closer. 2011 → Jenkins gains popularity, automating software builds and testing. 2013 → Docker launches, making containers easy to build, ship, and run. 2014 → Google open-sources Kubernetes to orchestrate containers at scale. 2015 → CNCF is founded, and Kubernetes 1.0 is released. 2009: the word DevOps is born at DevOpsDays in Belgium. 2011: Jenkins becomes popular — automated build and test. 2013: Docker. Containers weren't invented by Docker; the idea is from 1979. Docker made them easy. That's the real innovation. 2014 and 2015: Kubernetes is open-sourced by Google, then becomes a community standard under the CNCF.