chaidocs
docker-k8s-fundamentals

Foundations

Akash Kadlag 16 pages 8 min read Updated Nov 18, 2026
On this page
  1. **Foundations**
  2. Pain → Fix → New Pain
  3. The Software Development Life Cycle
  4. Waterfall → Agile
  5. Same code, four **different** machines
  6. Wall between Dev & Ops
  7. A deployment night
  8. The problems with the old process
  9. The problems with the old process
  10. Why DevOps came
  11. CI/CD
  12. Manual release vs CI/CD
  13. Pipeline automated but what about the **servers**?
  14. Can we ship the environment along with the code?
  15. Nothing Here Happened Overnight
  16. Docker Made Containers Easy
Foundations
chaicode.com
Notes
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

  1. 01PainSomething hurt
  2. 02FixSomeone fixed it
  3. 03New painThe fix exposed the next problem

Whenever a tool appears, ask one question: what was hurting before it existed?

chaicode.com
Notes
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

Planwhat and whyDesignarchitecture · APIsDevelopwrite the codeTestprove it worksDeployto real usersMonitorwatch it live123456repeat
  1. 1Plan: what are we building, and why?
  2. 2Design: architecture, database, APIs
  3. 3Develop: write the code
  4. 4Test: prove it works
  5. 5Deploy: put it on servers for real users
  6. 6Monitor: watch it live, fix issues, feed learnings back into Plan
In plain words

SDLC The loop every feature goes through from idea to running in production

chaicode.com
Notes
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

  • 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

More releases means more deployments, and manual deployment can't keep up.

chaicode.com
Notes
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

Each set up by hand, by different people, at different times.

chaicode.com
Notes
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

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!"

Neither side is wrong. They were measured on opposite goals.

chaicode.com
Notes
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

Miss one step and production goes down at 2 AM.

chaicode.com
Notes
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

  1. 01Environment driftServers slowly become different, so bugs appear only in prod
  2. 02Dependency conflictsApp A needs Python 3.8, app B needs 3.12, on the same server
  3. 03Slow onboardingA new developer spends days setting up their laptop
chaicode.com
Notes
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

  1. 01Snowflake serversUnique, hand-tuned servers that nobody dares touch
  2. 02Painful rollbacksUndoing a release means redoing steps by hand
  3. 03Manual scaling10 servers means doing everything 10 times

Later we'll see which of the six are still standing.

chaicode.com
Notes
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

DevOps is a culture plus practices that bring Development and Operations together to ship faster and more reliably.

  1. 01Shared ownership"You build it, you run it"
  2. 02Automate the repeatedBuild, test, deploy, infrastructure
  3. 03Small, frequent releasesInstead of big risky ones
  4. 04Fast feedbackThrough monitoring and alerts
chaicode.com
Notes
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

Commitevery pushBuildautomaticTestminutes, not weeksPackageready to releaseDeployone click, or none1234
  1. 1Every push triggers a build automatically
  2. 2Tests run on every build, so broken code is caught within minutes
  3. 3Every passing build is packaged and ready to release
  4. 4Delivery: a human clicks to release. Deployment: it goes to production on its own
In plain words

Continuous Integration Every push is built and tested automatically

Continuous Delivery Every passing build is ready to release with one click

Continuous Deployment Every passing build goes to production automatically

chaicode.com
Notes
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 releaseCI/CD
Once a month, a stressful nightMany times a day, a non-event
Bugs found lateBugs found within minutes
Depends on one person's memoryRepeatable, written as code

The release stops being an event and becomes a non-event.

chaicode.com
Notes
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?

The script was the same, but the servers weren't.

In plain words

CI/CD pipeline The automated path code takes from commit to deployment

VM A virtual machine: a whole operating system running inside another, heavy and slow to start

chaicode.com
Notes
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?

chaicode.com
Notes
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

  1. 011979Unix chroot, isolating a process's view of files. That is the first seed of containers.
  2. 022001The Agile Manifesto changes how software teams build, iterate, and deliver.
  3. 032006AWS EC2 makes computing power available on demand, by the hour.
  4. 042008LXC brings container isolation capabilities to Linux.

The evolution of containerization and modern infrastructure.

chaicode.com
Notes
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

  1. 012009Patrick Debois introduces the term DevOps, bringing development and operations closer.
  2. 022011Jenkins gains popularity, automating software builds and testing.
  3. 032013Docker launches, making containers easy to build, ship, and run.
  4. 042014Google open-sources Kubernetes to orchestrate containers at scale.
  5. 052015CNCF is founded, and Kubernetes 1.0 is released.
chaicode.com
Notes
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.