docker-k8s-fundamentals
Foundations
On this page
- **Foundations**
- Pain → Fix → New Pain
- The Software Development Life Cycle
- Waterfall → Agile
- Same code, four **different** machines
- Wall between Dev & Ops
- A deployment night
- The problems with the old process
- The problems with the old process
- Why DevOps came
- CI/CD
- Manual release vs CI/CD
- Pipeline automated but what about the **servers**?
- Can we ship the environment along with the code?
- Nothing Here Happened Overnight
- Docker Made Containers Easy
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.