# DevOps Engineer roadmap

> Automate, ship and run software: Linux, networking, containers, Kubernetes, cloud, IaC, CI/CD, GitOps, observability and SRE.

Canonical: https://www.internhack.in/roadmaps/tracks/devops
Last updated: 2026-11-28

18 sections, 86 topics, about 455 hours.

A complete path from your first automation script to operating production systems. You start with Linux, shell and networking fundamentals, move through Git, web servers, containers and Kubernetes, then learn a cloud provider, infrastructure as code, CI/CD pipelines and GitOps. Later sections cover secrets, observability, SLOs, incident response, DevSecOps, database operations, platform engineering and cost, and a capstone ties everything together into one production-shaped platform you can show employers.

## Outcomes

- Administer Linux servers and debug networking problems from DNS to TLS
- Build secure container images and run workloads on Kubernetes with Helm
- Provision cloud infrastructure on AWS, Azure or GCP with Terraform and configure hosts with Ansible
- Design CI/CD pipelines with safe rollout strategies and GitOps-driven deployments
- Manage secrets without committing them and secure the software supply chain
- Instrument systems with metrics, logs and traces, and run alerting against SLOs
- Lead incident response, write blameless postmortems and plan for disaster recovery
- Operate stateful databases with tested backups, failover and zero-downtime migrations

## Prerequisites

- Comfortable using a computer and installing software
- Basic programming experience in any language helps but is not required

## Mindset and an Automation Language

Understand what DevOps work actually is, then pick one programming language you will use to automate everything that follows.

### What DevOps Really Means

core · beginner · about 3 h · https://www.internhack.in/roadmaps/tracks/devops/devops-culture

DevOps is a way of building and running software where the same team owns delivery speed and production stability, backed by automation and feedback loops.

DevOps is not a job title or a tool. It is a set of practices that shorten the path from a code change to that change running safely in production, and then feed what production teaches you back into development. The DevOps or platform engineer is usually the person who builds the paved road: pipelines, infrastructure, observability and guardrails that let product teams ship on their own.

#### The core ideas
- **Flow**: small batches, frequent merges, automated builds and deploys. Large, rare releases are risky releases.
- **Feedback**: fast tests, monitoring, alerts and postmortems tell you quickly when something is wrong.
- **Shared ownership**: "you build it, you run it". Developers see production data; operators take part in design.
- **Automation over tickets**: anything done twice by hand is a candidate for a script, a pipeline or a template.

#### How success is measured
The DORA research program popularised four delivery metrics: **deployment frequency**, **lead time for changes**, **change failure rate** and **time to restore service**. Good teams improve speed and stability together; they are not a trade-off.

#### Common pitfalls
Renaming the ops team to "DevOps team" and changing nothing else, buying tools before fixing the process, and automating a broken manual process instead of simplifying it first.

**Good enough to move on:** you can explain the four DORA metrics, describe how a change travels from a laptop to production in a healthy team, and name one thing in your own projects you would automate.

Key concepts: Flow, feedback and continuous learning, DORA delivery metrics, You build it, you run it, DevOps vs SRE vs platform engineering, Toil and automation, Internal developer platforms.

Mini project: Draw the path of one change in a project you know, from commit to production, mark every manual step and estimate how long each takes. Pick the slowest step and write a one-page plan to automate it.

Self-check: Why does deploying more often usually lower the change failure rate instead of raising it?

Resources:
- [What is DevOps?](https://aws.amazon.com/devops/what-is-devops/) (AWS)
- [DORA research and capabilities](https://dora.dev/) (DORA)
- [Site Reliability Engineering (free online)](https://sre.google/sre-book/table-of-contents/) (Google)

### Python for Automation

recommended · beginner · about 25 h · https://www.internhack.in/roadmaps/tracks/devops/python-automation

Python is the most common glue language in operations work: readable, batteries-included and supported by every cloud SDK.

Every DevOps engineer needs one real programming language for tasks that outgrow a shell script: calling cloud APIs, parsing JSON and YAML, writing small CLIs, generating config, or building a Slack bot that reports deploys. **Python** is our recommendation because it is easy to read, installed almost everywhere, and has first-class libraries for AWS (`boto3`), Azure, GCP, Kubernetes and Ansible.

#### What to learn
- Core syntax: variables, functions, lists, dicts, loops, comprehensions, exceptions.
- Files and paths with `pathlib`, running commands with `subprocess.run`, reading env vars with `os.environ`.
- Data formats: `json`, `csv`, and YAML via `PyYAML`.
- HTTP calls with `requests` or `httpx`, and handling timeouts and retries.
- Building CLIs with `argparse` (or `click`/`typer`), and logging with the `logging` module.
- Isolated environments with `venv` and pinned dependencies (`requirements.txt` or `pyproject.toml`).

#### Pitfalls
Installing packages into the system Python, catching every exception silently, and hard-coding credentials. Always read secrets from the environment or a secret manager and exit with a non-zero code on failure so pipelines notice.

**Good enough to move on:** you can write a 100-200 line script with arguments, logging, error handling and a virtual environment, that talks to an HTTP API and writes a report.

Key concepts: Syntax, data structures and functions, Files, paths and subprocess, JSON, YAML and CSV handling, HTTP clients and API calls, argparse / click CLIs, venv and dependency pinning, boto3 and cloud SDKs, pytest for scripts.

Mini project: Write a Python CLI that takes a list of URLs from a YAML file, checks each one with a timeout, and prints a table of status codes and latency, exiting non-zero if any check fails.

Self-check: Why should an automation script exit with a non-zero status code on failure, and what breaks if it does not?

Resources:
- [The Python Tutorial](https://docs.python.org/3/tutorial/) (python.org)
- [Automate the Boring Stuff with Python](https://automatetheboringstuff.com/) (Al Sweigart)

### Go for Tooling

alternative · beginner · about 30 h · https://www.internhack.in/roadmaps/tracks/devops/go-for-devops

Go compiles to a single static binary and is the language most cloud-native tools (Docker, Kubernetes, Terraform) are written in.

**Go** is a strong alternative if you want to build tools rather than scripts. It produces one static binary per platform, so distribution is trivial: copy the file and run it. Kubernetes, Docker, Terraform, Prometheus and most CNCF projects are written in Go, so knowing it lets you read their source, write Kubernetes controllers and contribute plugins.

#### What to learn
- Packages, modules (`go mod`), types, structs, interfaces and error values.
- Goroutines and channels for concurrent work such as checking hundreds of hosts in parallel.
- The standard library: `net/http`, `encoding/json`, `os/exec`, `flag`, `context` for timeouts.
- Cross-compiling with `GOOS` and `GOARCH`, and building small container images from a static binary.
- CLI frameworks such as `cobra` if your tool grows subcommands.

#### Pitfalls
Ignoring returned errors, leaking goroutines without a `context` cancel, and over-engineering a 30-line task that a shell script would solve.

**Good enough to move on:** you can build and cross-compile a CLI that makes concurrent HTTP calls with timeouts and handles errors explicitly.

Key concepts: Modules, packages and types, Error handling idioms, Goroutines, channels and context, net/http and encoding/json, Cross-compilation, cobra CLIs.

Mini project: Build a Go binary that pings a list of hosts concurrently with a 2 second timeout each, then cross-compile it for Linux and macOS and run it from a scratch-based container image.

Self-check: What does passing a context with a deadline into an HTTP request protect you from?

Resources:
- [A Tour of Go](https://go.dev/tour/) (go.dev)
- [Go documentation](https://go.dev/doc/) (go.dev)

### Bash as Your First Language

alternative · beginner · about 15 h · https://www.internhack.in/roadmaps/tracks/devops/bash-first

Going deep on Bash first gets you productive on servers quickly, as long as you know when to switch to a real language.

Some people start with **Bash** as their main automation language because every Linux box already has it and most operational glue (install scripts, entrypoints, CI steps) is written in it. This path is valid, but Bash has sharp edges, so pair it with a general-purpose language later.

#### What to learn
- Variables, quoting rules, `if`, `case`, `for`, `while`, functions and exit codes.
- Safe script headers: `set -euo pipefail` and a sensible `IFS`.
- Arrays, parameter expansion (`${var:-default}`), and command substitution.
- Reading arguments with `getopts`, and `trap` for cleanup.
- Linting with **ShellCheck** on every script.

#### When Bash stops being the right tool
Once a script needs data structures, JSON manipulation beyond `jq`, retries with backoff, or more than a couple of hundred lines, rewrite it in Python or Go. Unquoted variables and word splitting are the number one source of Bash bugs.

**Good enough to move on:** your scripts pass ShellCheck, fail loudly, clean up temporary files, and you can explain why `"$@"` is quoted.

Key concepts: Quoting and word splitting, set -euo pipefail, Functions, arrays and expansion, getopts and trap, ShellCheck.

Mini project: Write a backup script that tars a directory, names it with a timestamp, keeps only the last 7 archives, cleans up on Ctrl+C with trap, and passes ShellCheck with no warnings.

Self-check: What goes wrong when you write rm -rf $DIR/ without quotes and DIR is empty?

Resources:
- [GNU Bash Reference Manual](https://www.gnu.org/software/bash/manual/) (GNU)
- [ShellCheck](https://www.shellcheck.net/) (shellcheck.net)

### JavaScript / Node.js for Automation

alternative · beginner · about 20 h · https://www.internhack.in/roadmaps/tracks/devops/node-automation

If you already know JavaScript, Node.js is a practical automation language with strong SDKs and a huge package ecosystem.

If you come from web development, **Node.js** lets you reuse what you know. AWS CDK, Pulumi, GitHub Actions custom actions and many CLIs are written in TypeScript or JavaScript, so this is a legitimate path.

#### What to learn
- Async programming with `async`/`await` and Promises, and handling rejections.
- `node:fs/promises`, `node:path`, `node:child_process` and reading `process.env`.
- The built-in `fetch` API for HTTP calls, with timeouts via `AbortSignal.timeout`.
- Packaging CLIs with a `bin` entry in `package.json`, and locking dependencies with a lockfile.
- TypeScript basics, since infra tools like CDK and Pulumi work best with types.

#### Pitfalls
Unhandled promise rejections that exit silently, pulling in heavy dependencies for trivial tasks, and scripts that depend on a specific global Node version. Pin the version with `.nvmrc` or `engines`.

**Good enough to move on:** you can write a Node script that reads config, calls an API with retries, and exits with a meaningful status code.

Key concepts: async / await and Promises, fs, path and child_process, fetch and timeouts, npm scripts and lockfiles, TypeScript basics.

Mini project: Write a Node script that lists the open pull requests of a GitHub repo via the REST API and posts a summary to a webhook, failing clearly if the token is missing.

Self-check: What happens to a Node process when a Promise rejects and nothing handles it?

Resources:
- [Learn Node.js](https://nodejs.org/en/learn) (nodejs.org)
- [Node.js API docs](https://nodejs.org/docs/latest/api/) (nodejs.org)

## Living on Linux

Almost every server, container and CI runner you touch runs Linux. Learn how it works under the hood, not just which commands to type.

### Linux Command Line and Packages

core · beginner · about 15 h · https://www.internhack.in/roadmaps/tracks/devops/linux-basics

Navigate the filesystem, read documentation, install software and get comfortable working on a remote Linux server.

The Linux command line is your primary workspace as a DevOps engineer. Servers usually have no GUI, containers are Linux userlands, and CI jobs run shell commands. Fluency here makes everything else faster.

#### Essentials
- Navigation and files: `pwd`, `ls -la`, `cd`, `cp`, `mv`, `rm`, `mkdir -p`, `find`, `tree`.
- Reading files: `cat`, `less`, `head`, `tail -f`, `wc`.
- Getting help: `man`, `--help`, and `tldr` for quick examples.
- Pipes and redirection: `|`, `>`, `>>`, `2>&1`, and `tee`.
- Environment: `PATH`, `export`, `env`, and dotfiles like `~/.bashrc`.

#### Distributions and package managers
Distros differ mainly in package tooling and release cadence. Debian and Ubuntu use `apt` with `.deb` packages; RHEL, Fedora, Rocky and Amazon Linux use `dnf`/`yum` with `.rpm`; Alpine (popular in containers) uses `apk`. Learn to search, install, pin versions, add a vendor repository with its signing key, and apply security updates.

#### Pitfalls
Running everything as root, piping random `curl | sh` installers without reading them, and not knowing which distro you are on (`cat /etc/os-release`).

**Good enough to move on:** you can SSH into a fresh VM, find what distro it runs, install and update packages, locate a config file with `find`, and follow a log with `tail -f`.

Key concepts: Filesystem navigation, Pipes and redirection, man pages and help, Environment variables and PATH, apt (Debian/Ubuntu), dnf / yum (RHEL family), apk (Alpine), Snap / Flatpak.

Mini project: Spin up an Ubuntu VM (or WSL), install nginx from apt, find its config and log files with find, and write down every command you used as a reproducible setup script.

Self-check: What is the difference between > and >> and what does 2>&1 do at the end of a command?

Resources:
- [Linux Journey](https://linuxjourney.com/) (linuxjourney.com)
- [Linux man pages](https://man7.org/linux/man-pages/) (man7.org)

### Processes, Signals and Resources

core · beginner · about 6 h · https://www.internhack.in/roadmaps/tracks/devops/processes-signals

Understand how Linux runs programs, how to inspect and stop them, and how the kernel shares CPU and memory between them.

Every running program is a **process** with a PID, a parent, an owner, open file descriptors and a slice of CPU and memory. When a service misbehaves in production, you will be inspecting processes.

#### Key concepts
- **fork and exec**: new processes are cloned from a parent, then replaced with a new program. PID 1 is the init system (or your app, inside a container).
- **States**: running, sleeping, stopped, and **zombie** (finished but not reaped by its parent).
- **Signals**: `SIGTERM` asks a process to stop gracefully, `SIGKILL` forces it, `SIGHUP` often means "reload config", `SIGINT` is Ctrl+C. Apps should handle SIGTERM to shut down cleanly; Kubernetes and Docker send it before killing.
- **Foreground and background jobs**: `&`, `jobs`, `fg`, `bg`, `nohup`.
- **Priorities and limits**: `nice`, `renice`, `ulimit` (open files is a classic production limit).

#### Tools
`ps aux`, `pstree`, `top`/`htop`, `kill`, `pgrep`/`pkill`, `lsof` (who has this file or port open), and the `/proc` filesystem, which exposes every process as a directory.

#### Pitfalls
Reaching for `kill -9` first (no cleanup, possible corruption), and forgetting that a container whose PID 1 ignores SIGTERM will take the full grace period to stop.

**Good enough to move on:** you can find which process is using a port, explain what happens when you send SIGTERM versus SIGKILL, and read a process's limits in /proc.

Key concepts: PIDs, parents and fork/exec, Signals: TERM, KILL, HUP, INT, ps, top, htop, pgrep, lsof and file descriptors, Jobs, nohup and background work, nice and ulimit, /proc filesystem, cgroups and namespaces.

Mini project: Write a tiny program that traps SIGTERM and logs a graceful shutdown message, run it in the background, then use pgrep, lsof and kill to find and stop it while watching the log.

Self-check: Why might a containerised app take 30 seconds to stop, and how would you fix it?

Resources:
- [Linux Journey: Processes](https://linuxjourney.com/) (linuxjourney.com)
- [signal(7) man page](https://man7.org/linux/man-pages/man7/signal.7.html) (man7.org)

### Filesystems, Disks and Storage

core · beginner · about 6 h · https://www.internhack.in/roadmaps/tracks/devops/filesystems-storage

Learn the Linux directory layout, how disks are partitioned and mounted, and how to find out what is filling a disk at 3 a.m.

A full disk is one of the most common production incidents. Knowing how Linux organises storage lets you diagnose it quickly and design systems that do not fall over.

#### Layout and concepts
- The **Filesystem Hierarchy Standard**: `/etc` config, `/var/log` logs, `/var/lib` app data, `/tmp`, `/home`, `/opt`, `/usr/bin`.
- **Inodes**: each file has metadata stored in an inode. You can run out of inodes before running out of space (millions of tiny files).
- **Hard links vs symbolic links**, and why deleted-but-open files still consume space until the process closes them.

#### Disks and mounts
- Inspect with `lsblk`, `df -h`, `df -i`, `du -sh *`, `ncdu`.
- Partition and format with `fdisk`/`parted` and `mkfs.ext4` or `mkfs.xfs`, then mount and persist in `/etc/fstab` (use UUIDs).
- **LVM** lets you resize volumes; cloud block volumes (EBS, Azure Disk) can often be grown online.
- Swap, tmpfs, and network filesystems such as NFS.

#### Pitfalls
Logs without rotation (configure `logrotate`), a bad fstab entry that stops the machine booting (use `nofail` for optional disks), and deleting a huge log file that a process still holds open.

**Good enough to move on:** you can attach a new disk to a VM, format and mount it persistently, and track down the directory eating all the space.

Key concepts: Filesystem Hierarchy Standard, Inodes and links, df, du, lsblk, ncdu, Partitioning, mkfs and fstab, LVM, logrotate, NFS and network storage.

Mini project: Attach a second virtual disk to a VM, create an ext4 filesystem, mount it at /data via a UUID fstab entry, reboot to prove it persists, and set up logrotate for an app log written there.

Self-check: df says the disk is full but du cannot find the files. What is the likely cause and how do you confirm it?

Resources:
- [Linux Journey: The Filesystem](https://linuxjourney.com/) (linuxjourney.com)
- [hier(7) man page](https://man7.org/linux/man-pages/man7/hier.7.html) (man7.org)

### Users, Groups and Permissions

core · beginner · about 5 h · https://www.internhack.in/roadmaps/tracks/devops/users-permissions

Control who can read, write and execute what on a Linux system, and grant elevated access without handing out root.

Permissions are the first layer of least privilege. Misconfigured permissions cause both security holes and baffling "permission denied" failures in deploys.

#### The model
- Every file has an **owner**, a **group**, and read/write/execute bits for owner, group and others. Read them with `ls -l`, change them with `chmod` (symbolic `u+x` or octal `640`) and `chown user:group`.
- On directories, **x** means "can enter" and **r** means "can list".
- Special bits: **setuid**, **setgid** (new files inherit the directory group) and the **sticky bit** (as on `/tmp`).
- **umask** sets default permissions for new files.

#### Users and privilege
- Accounts live in `/etc/passwd` and `/etc/shadow`; groups in `/etc/group`. Use `useradd`, `usermod -aG`, `id`.
- **Service accounts**: run each daemon as its own non-login user.
- **sudo** with rules in `/etc/sudoers.d/` (edit via `visudo`) grants specific commands instead of full root.
- Beyond basics: ACLs (`setfacl`), and mandatory access control with SELinux or AppArmor.

#### Pitfalls
`chmod -R 777` to "fix" an error, running apps as root, and disabling SELinux instead of reading its audit log.

**Good enough to move on:** you can create a service user, give a deploy group write access to one directory only, and grant a single sudo command.

Key concepts: rwx bits, chmod and chown, Users, groups and service accounts, sudo and sudoers, setuid, setgid, sticky bit, umask, ACLs, SELinux / AppArmor.

Mini project: Create an app user and a deployers group. Make /srv/app writable by deployers only, run a small service as the app user, and allow deployers to restart just that service with sudo.

Self-check: Why can a user sometimes delete a file they have no write permission on?

Resources:
- [Linux Journey: Permissions](https://linuxjourney.com/) (linuxjourney.com)
- [sudoers(5) man page](https://man7.org/linux/man-pages/man5/sudoers.5.html) (man7.org)

### Services with systemd

core · intermediate · about 6 h · https://www.internhack.in/roadmaps/tracks/devops/systemd-services

Run, supervise, schedule and log long-running services on modern Linux using systemd units and journald.

**systemd** is the init system on almost every mainstream distribution. It starts services at boot, restarts them when they crash, orders dependencies, schedules jobs and collects logs. If you deploy anything to a VM, you will write unit files.

#### Working with units
- `systemctl start|stop|restart|reload|status <unit>`, `enable` to start at boot, `daemon-reload` after editing files.
- Unit files live in `/etc/systemd/system/`. A service unit has `[Unit]` (description, `After=`, `Wants=`), `[Service]` (`ExecStart`, `User`, `Restart=on-failure`, `Environment`/`EnvironmentFile`) and `[Install]` (`WantedBy=multi-user.target`).
- Override vendor units safely with `systemctl edit` (drop-in files) instead of editing the originals.

#### Logs and timers
- `journalctl -u myapp -f`, `--since "10 min ago"`, `-p err` to filter by priority.
- **Timers** replace cron for scheduled jobs, with logging and missed-run handling built in.

#### Hardening
Directives like `NoNewPrivileges=true`, `ProtectSystem=strict`, `PrivateTmp=true` and resource limits (`MemoryMax`, `CPUQuota`) sandbox a service cheaply.

#### Pitfalls
Forgetting `daemon-reload`, services that fork into the background when systemd expects `Type=simple`, and restart loops that hide a crash (check `systemctl status` and the journal).

**Good enough to move on:** you can turn any app into a hardened systemd service that restarts on failure, and schedule a job with a timer.

Key concepts: systemctl basics, Writing service unit files, Restart policies and dependencies, journalctl, systemd timers vs cron, Drop-in overrides, Sandboxing directives.

Mini project: Deploy a small web app as a systemd service running under its own user with Restart=on-failure and an EnvironmentFile, then add a timer that hits its health endpoint every 5 minutes and logs failures.

Self-check: You edited a unit file and restarted the service but nothing changed. What step did you miss?

Resources:
- [systemd project](https://systemd.io/) (systemd.io)
- [systemd man pages](https://www.freedesktop.org/software/systemd/man/latest/) (freedesktop.org)

### Performance and Troubleshooting

core · intermediate · about 8 h · https://www.internhack.in/roadmaps/tracks/devops/linux-performance

Diagnose slow or unhealthy machines methodically by checking CPU, memory, disk I/O and network with the right tools.

When a server is slow, guessing wastes time. Use a method: check **utilisation, saturation and errors** (the USE method) for each resource: CPU, memory, disk and network.

#### The first-minute checklist
- `uptime`: load averages (compare with CPU count).
- `top`/`htop`: which process is hot; watch `%wa` (I/O wait) and `st` (steal time on VMs).
- `free -m` and `vmstat 1`: memory pressure, swapping, run queue.
- `iostat -xz 1`: disk utilisation and latency.
- `ss -tulpn` and `sar -n DEV 1`: sockets and network throughput.
- `dmesg -T`: kernel messages such as the **OOM killer** or disk errors.

#### Going deeper
`strace` shows the system calls a process makes (great for "why is it hanging?"), `perf` profiles CPU usage, and eBPF tools (`bcc`, `bpftrace`) answer precise questions with low overhead.

#### Pitfalls
Treating load average as CPU percentage, assuming "free memory is low" is a problem (Linux uses spare RAM for cache), and restarting the box before capturing evidence.

**Good enough to move on:** given a slow VM, you can tell within five minutes whether the bottleneck is CPU, memory, disk or network, and which process causes it.

Key concepts: USE method, Load average and CPU, Memory, cache and OOM killer, Disk I/O with iostat, vmstat, sar, ss, strace, perf and flame graphs, eBPF tools.

Mini project: Use stress-ng to create CPU, memory and I/O pressure on a VM one at a time, and for each run record which tool revealed the problem first and what the key numbers looked like.

Self-check: A 4-core machine shows a load average of 12 but CPU usage is only 20%. What is probably happening?

Resources:
- [Linux Performance](https://www.brendangregg.com/linuxperf.html) (Brendan Gregg)
- [The USE Method](https://www.brendangregg.com/usemethod.html) (Brendan Gregg)

## Shell Scripting and Terminal Craft

Turn repetitive terminal work into reliable scripts, slice text and logs with classic Unix tools, and set up an efficient editing workflow.

### Shell Scripting for Ops

core · beginner · about 10 h · https://www.internhack.in/roadmaps/tracks/devops/shell-scripting

Write robust Bash scripts for provisioning, entrypoints and CI steps that fail loudly and are safe to re-run.

Even if Python is your main language, you will read and write shell scripts constantly: Dockerfile entrypoints, CI steps, bootstrap scripts and one-off fixes. The goal is scripts that are **safe, idempotent and readable**.

#### Building blocks
- Shebang `#!/usr/bin/env bash` and strict mode `set -euo pipefail`.
- Always quote expansions: `"$var"`, `"$@"`.
- Test conditions with `[[ ... ]]`, check commands with `command -v`, compare exit codes with `$?`.
- Functions with `local` variables, and a `main` function called at the bottom.
- `trap cleanup EXIT` for temp files created with `mktemp`.
- Here-docs for generating config files.

#### Idempotency
A script that provisions a server should be safe to run twice: check before creating (`mkdir -p`, `id user || useradd user`), and prefer declarative tools once logic grows.

#### JSON in the shell
`jq` is essential for reading API responses and cloud CLI output, for example `aws ec2 describe-instances | jq -r '.Reservations[].Instances[].InstanceId'`.

#### Pitfalls
Parsing `ls` output, silent failures in pipelines without `pipefail`, and scripts that only work from one directory (use `cd "$(dirname "$0")"`).

**Good enough to move on:** you can write a re-runnable bootstrap script with logging, argument parsing and cleanup that passes ShellCheck.

Key concepts: Strict mode and quoting, Conditionals, loops and functions, Exit codes and error handling, trap and mktemp, Idempotent scripts, jq for JSON, cron scheduling.

Mini project: Write a bootstrap.sh that creates a user, installs packages, writes a config from a here-doc and enables a service; run it twice on the same VM and prove the second run changes nothing.

Self-check: Without set -o pipefail, what exit code does false | true return, and why does that matter in CI?

Resources:
- [GNU Bash Reference Manual](https://www.gnu.org/software/bash/manual/) (GNU)
- [jq manual](https://jqlang.org/manual/) (jqlang)
- [ShellCheck](https://www.shellcheck.net/) (shellcheck.net)

### Text Wrangling: grep, sed, awk and Friends

core · beginner · about 8 h · https://www.internhack.in/roadmaps/tracks/devops/text-processing

Search, filter, transform and summarise logs and config files straight from the terminal using composable Unix tools.

Logs, config and command output are all text. The classic Unix tools, chained with pipes, let you answer questions like "which IPs caused the most 500 errors in the last hour?" in one line.

#### The toolkit
- **grep**: search with regular expressions. `-i`, `-v`, `-r`, `-E`, `-o`, `-c`, `-A/-B` for context. `ripgrep` (`rg`) is a faster modern alternative.
- **sed**: stream editing, mostly substitution: `sed -i 's/old/new/g' file`. Also delete or print line ranges.
- **awk**: field-based processing: `awk '{print $1}'`, `-F:` for custom separators, sums and counts with associative arrays.
- **cut**, **sort**, **uniq -c**, **tr**, **wc**, **xargs**, **head**, **tail**, **column**.

#### A classic pattern
`awk '$9 == 500 {print $1}' access.log | sort | uniq -c | sort -rn | head` lists the top clients hitting errors.

#### Regular expressions
Learn anchors (`^`, `$`), character classes, quantifiers and groups, and the difference between basic and extended regex.

#### Pitfalls
Using `sed -i` without a backup on production config, greedy regex matching more than intended, and `xargs` breaking on filenames with spaces (use `-0` with `find -print0`).

**Good enough to move on:** given an unfamiliar log file, you can extract, count and rank any field without opening an editor.

Key concepts: grep and ripgrep, Regular expressions, sed substitutions, awk fields and aggregates, sort, uniq, cut, tr, xargs and find -exec, yq for YAML.

Mini project: Download a sample nginx access log and write one-liners that report requests per status code, the top 10 IPs, the slowest endpoints, and requests per minute.

Self-check: How would you replace a hostname in every .conf file under a directory, and how would you make it safe to undo?

Resources:
- [GNU sed manual](https://www.gnu.org/software/sed/manual/) (GNU)
- [GNU Awk User's Guide](https://www.gnu.org/software/gawk/manual/) (GNU)
- [GNU grep manual](https://www.gnu.org/software/grep/manual/) (GNU)

### Editors and Terminal Productivity

core · beginner · about 4 h · https://www.internhack.in/roadmaps/tracks/devops/editors-terminal

Be able to edit files on any server with a terminal editor, and multiply your speed with multiplexers, SSH config and good dotfiles.

You will regularly edit files on machines with nothing but a terminal. Being comfortable in at least one terminal editor, and knowing how to keep sessions alive, removes a lot of friction.

#### Editors
- **Vim** (or Neovim) is on nearly every server. Learn modes, `:w`, `:q!`, search `/`, replace `:%s/a/b/g`, and basic motions. You do not need a heavy plugin setup.
- **nano** is fine for quick edits if Vim feels heavy.
- On your laptop, **VS Code** with Remote-SSH, YAML, Docker and Terraform extensions is a strong daily driver.

#### Terminal workflow
- **tmux** (or screen) keeps sessions running when your SSH connection drops and lets you split panes to tail logs while editing.
- Shell history search (Ctrl+R), aliases, and a prompt that shows git branch and Kubernetes context.
- Tools that pay off: `fzf`, `bat`, `htop`, `watch`, `ncdu`.
- Keep your **dotfiles** in a git repo so any new machine feels like home.

#### Pitfalls
Long-running operations in a plain SSH session (use tmux), and a prompt that hides which production context you are in.

**Good enough to move on:** you can open, edit, search-replace and save a file in Vim without panic, and keep a long job running across a dropped connection with tmux.

Key concepts: Vim essentials, nano, VS Code Remote-SSH, tmux sessions and panes, History search and aliases, Dotfiles in git, fzf and modern CLI tools.

Mini project: Create a dotfiles repo with your shell aliases, a tmux config and a minimal vimrc, plus an install script that symlinks them, and use it to set up a fresh VM.

Self-check: Your SSH connection drops during a 40 minute database migration. How would you have prevented losing it?

Resources:
- [Vim documentation](https://www.vim.org/docs.php) (vim.org)
- [tmux wiki](https://github.com/tmux/tmux/wiki) (GitHub)

## Networking You Will Actually Debug

Most outages look like network problems. Learn how packets, names, HTTP and encryption work so you can trace a request end to end.

### How the Internet Works: TCP/IP and the OSI Model

core · beginner · about 10 h · https://www.internhack.in/roadmaps/tracks/devops/internet-tcpip

Understand layers, IP addressing, subnets, routing, and the difference between TCP and UDP well enough to reason about any connection problem.

Networking knowledge separates engineers who guess from those who diagnose. You do not need to be a network engineer, but you must be able to follow a packet from a client to your service.

#### Layers as a mental model
The **OSI model** (7 layers) and the simpler **TCP/IP model** (link, internet, transport, application) are ways to locate a problem. "Can I resolve the name?" (application/DNS), "Can I reach the IP?" (internet), "Is the port open?" (transport), "Is the app answering correctly?" (application).

#### Addressing and routing
- **IPv4** addresses and **CIDR** notation: `10.0.0.0/16` holds 65,536 addresses; `/24` holds 256. You will size VPCs and subnets with this.
- **Private ranges** (10/8, 172.16/12, 192.168/16) and **NAT** to reach the internet.
- Default gateway, route tables, and **IPv6** basics.
- **ARP** maps IPs to MAC addresses on a local network.

#### Transport
- **TCP**: connection-oriented, three-way handshake, ordered and retransmitted. Most web traffic.
- **UDP**: connectionless and lightweight: DNS, video, QUIC (HTTP/3).
- **Ports** identify services; ephemeral ports are used by clients.

#### Tools
`ip addr`, `ip route`, `ping`, `traceroute`/`mtr`, `ss -tulpn`, `nc -zv host port`, `curl -v`, and `tcpdump` when you need to see raw packets.

**Good enough to move on:** you can split a /16 into subnets, explain the TCP handshake, and systematically answer "why can't service A reach service B?"

Key concepts: OSI and TCP/IP models, IPv4, CIDR and subnetting, Private ranges and NAT, Routing and gateways, TCP vs UDP, Ports and sockets, IPv6 basics, ping, mtr, ss, nc, tcpdump.

Mini project: Design the address plan for a VPC with public, private and database subnets across 3 availability zones on paper, then verify your math with ipcalc and document it as a table.

Self-check: nc -zv to a port returns 'connection refused' on one host and times out on another. What does each tell you?

Resources:
- [Cloudflare Learning Center](https://www.cloudflare.com/learning/) (Cloudflare)
- [What is the OSI model?](https://www.cloudflare.com/learning/ddos/glossary/open-systems-interconnection-model-osi/) (Cloudflare)

### DNS in Practice

core · beginner · about 5 h · https://www.internhack.in/roadmaps/tracks/devops/dns

Learn how names turn into addresses, which record types you will manage, and why DNS is behind so many surprising outages.

DNS translates names like `api.example.com` into IP addresses. It is a hierarchical, cached, distributed database, and a surprising share of incidents come down to a DNS change, a TTL, or a resolver misbehaving.

#### How resolution works
Your machine asks a **recursive resolver** (your ISP, 1.1.1.1, or the VPC resolver). The resolver walks from the **root** servers to the **TLD** (`.com`) servers to the domain's **authoritative** name servers, then caches the answer for the record's **TTL**.

#### Records you will manage
- **A / AAAA**: name to IPv4 / IPv6.
- **CNAME**: alias to another name (not allowed at the zone apex; providers offer ALIAS/ANAME records instead).
- **MX** mail, **TXT** (domain verification, SPF, DKIM), **NS** delegation, **SRV**, **CAA** (which CAs may issue certificates).

#### Operations
- Lower the TTL a day **before** a migration so the cut-over propagates quickly.
- Managed DNS: Route 53, Cloud DNS, Azure DNS, Cloudflare. Manage records as code.
- Inside Kubernetes, **CoreDNS** gives services names like `svc.namespace.svc.cluster.local`.

#### Tools and pitfalls
`dig +trace example.com`, `dig @8.8.8.8 example.com A`, `nslookup`, and `/etc/resolv.conf`. Watch out for negative caching, split-horizon DNS (different answers inside and outside the VPC), and apps that cache DNS forever.

**Good enough to move on:** you can trace a lookup with dig, pick the right record type for any need, and plan a zero-downtime DNS cut-over.

Key concepts: Recursive vs authoritative resolvers, A, AAAA, CNAME, MX, TXT, NS, TTL and caching, dig and nslookup, Managed DNS services, Split-horizon and private zones, DNSSEC.

Mini project: Register a cheap domain or use a free subdomain, point it at a VM with an A record, add a CNAME for www and a TXT record, then trace resolution with dig +trace and document what each hop returned.

Self-check: You changed an A record an hour ago but some users still hit the old server. What are the likely reasons?

Resources:
- [What is DNS?](https://www.cloudflare.com/learning/dns/what-is-dns/) (Cloudflare)
- [Amazon Route 53 docs](https://docs.aws.amazon.com/route53/) (AWS)

### HTTP and HTTPS

core · beginner · about 5 h · https://www.internhack.in/roadmaps/tracks/devops/http-https

Know the request/response model, methods, status codes and headers that every web service, load balancer and health check speaks.

HTTP is the language of almost every service you will operate. Health checks, API gateways, CDNs, load balancers and ingress controllers all make decisions based on HTTP details.

#### Fundamentals
- **Request**: method (`GET`, `POST`, `PUT`, `PATCH`, `DELETE`), path, headers, optional body.
- **Response**: status code, headers, body.
- **Status codes**: 2xx success, 3xx redirects (301 vs 302), 4xx client errors (400, 401, 403, 404, 429), 5xx server errors (500, 502 bad gateway, 503 unavailable, 504 gateway timeout). For ops, 502 and 504 usually mean "the proxy could not get a good answer from the upstream".
- **Headers** you will touch: `Host`, `Content-Type`, `Authorization`, `Cache-Control`, `X-Forwarded-For`, `X-Request-ID`.

#### Versions
HTTP/1.1 (keep-alive), **HTTP/2** (multiplexing over one connection) and **HTTP/3** over QUIC/UDP. HTTPS is HTTP inside TLS.

#### Operational topics
Caching and CDNs, cookies and sessions (sticky sessions), CORS, compression, timeouts and retries (only retry idempotent requests), and rate limiting.

#### Tools
`curl -v`, `curl -I`, `curl -w '%{time_total}'`, browser dev tools, and `httpie`.

**Good enough to move on:** you can read a raw request and response, explain what a 502 versus a 504 means at a proxy, and time each phase of a request with curl.

Key concepts: Methods and idempotency, Status codes, Headers and X-Forwarded-*, HTTP/1.1, HTTP/2, HTTP/3, Caching and CDNs, CORS and cookies, curl for debugging.

Mini project: Write a curl-based script that reports DNS time, connect time, TLS time and time to first byte for a list of URLs, and run it against a site behind a CDN and one without.

Self-check: Why is it safe for a load balancer to retry a failed GET but risky to retry a POST?

Resources:
- [MDN: HTTP](https://developer.mozilla.org/en-US/docs/Web/HTTP) (MDN)
- [curl documentation](https://curl.se/docs/) (curl.se)

### TLS and Certificates

core · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/devops/tls-certificates

Understand how TLS encrypts traffic and proves identity, and how to issue, renew and debug certificates without outages.

Expired or misconfigured certificates are a classic self-inflicted outage. TLS knowledge lets you set up HTTPS correctly, automate renewal and debug handshake failures.

#### How it works
- **Asymmetric crypto** (public/private key pairs) authenticates the server and negotiates keys; **symmetric crypto** encrypts the bulk traffic.
- A **certificate** binds a public key to names (SANs) and is signed by a **Certificate Authority**. Clients trust a chain: leaf, intermediate(s), root in their trust store.
- The **handshake** negotiates version (use TLS 1.2+ and prefer 1.3), cipher, and uses **SNI** so one IP can serve many hostnames.

#### Operating certificates
- **Let's Encrypt** and the **ACME** protocol give free, automated certificates (certbot, Caddy, cert-manager in Kubernetes).
- Cloud-managed certificates (AWS ACM, Google-managed) on load balancers remove renewal work.
- **mTLS** (mutual TLS) authenticates clients too; service meshes use it between services.
- Where TLS terminates matters: at the CDN, load balancer, ingress, or the app itself.

#### Debugging
`openssl s_client -connect host:443 -servername host` shows the chain and expiry; `openssl x509 -in cert.pem -noout -text` inspects a file. Common errors: missing intermediate, wrong hostname, expired cert, clock skew.

**Good enough to move on:** you can issue a certificate with ACME, explain the chain of trust, and diagnose a failing handshake with openssl.

Key concepts: Symmetric vs asymmetric crypto, Certificates, CAs and chains, TLS handshake and SNI, Let's Encrypt and ACME, openssl debugging, Managed certificates (ACM etc.), mTLS.

Mini project: Put a small site behind nginx with a Let's Encrypt certificate, automate renewal, then add a Prometheus-style check or cron job that warns you 14 days before any certificate expires.

Self-check: Browsers accept your site but a curl call from a server fails with a certificate error. What is a common cause?

Resources:
- [Let's Encrypt documentation](https://letsencrypt.org/docs/) (Let's Encrypt)
- [What is TLS?](https://www.cloudflare.com/learning/ssl/transport-layer-security-tls/) (Cloudflare)

### Load Balancing and Proxies

core · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/devops/load-balancing-proxies

Learn how traffic is spread across instances, the difference between L4 and L7 balancing, and what forward and reverse proxies do.

Load balancers make services scalable and highly available. Almost every production request passes through at least one proxy, so their behaviour shapes latency, errors and failover.

#### Proxies
- A **forward proxy** acts for clients (corporate egress, caching).
- A **reverse proxy** sits in front of servers: TLS termination, routing, compression, caching, rate limiting. Nginx, HAProxy, Envoy and cloud load balancers are all reverse proxies.

#### Load balancing
- **Layer 4** balances TCP/UDP connections by IP and port; fast and protocol-agnostic (AWS NLB).
- **Layer 7** understands HTTP and can route by host, path or header (AWS ALB, ingress controllers).
- **Algorithms**: round robin, least connections, weighted, consistent hashing.
- **Health checks** remove bad instances; **connection draining** lets in-flight requests finish during deploys.
- **Session affinity** (sticky sessions) is sometimes needed but hurts even spreading.

#### Beyond one region
DNS-based and anycast global load balancing, and CDNs as edge proxies.

#### Pitfalls
Health checks that only test "process is up" rather than "can serve traffic", lost client IPs (use `X-Forwarded-For` or the PROXY protocol), and mismatched idle timeouts between the balancer and the app causing sporadic 502s.

**Good enough to move on:** you can choose between L4 and L7 for a use case, configure meaningful health checks, and explain how draining enables zero-downtime deploys.

Key concepts: Forward vs reverse proxy, L4 vs L7 load balancing, Balancing algorithms, Health checks and draining, Sticky sessions, Client IP preservation, Global load balancing and anycast.

Mini project: Run three copies of a small app that returns its hostname, put a reverse proxy in front with round robin and a health check, then kill one instance and show traffic keeps flowing.

Self-check: Why can a load balancer idle timeout that is longer than the app's keep-alive timeout cause random 502 errors?

Resources:
- [What is load balancing?](https://www.cloudflare.com/learning/performance/what-is-load-balancing/) (Cloudflare)
- [Elastic Load Balancing docs](https://docs.aws.amazon.com/elasticloadbalancing/) (AWS)

### Firewalls, Security Groups and NAT

core · intermediate · about 4 h · https://www.internhack.in/roadmaps/tracks/devops/firewalls-nat

Control which traffic may flow in and out of hosts and networks, both on Linux and in cloud networks.

Network access control is one of the most effective security layers you own. Default-deny inbound, open only what is needed, and know where each rule lives.

#### On the host
- **netfilter** is the kernel packet filter; `nftables` is the modern interface, `iptables` the older one you will still see.
- Friendly front ends: **ufw** (Ubuntu) and **firewalld** (RHEL).
- Stateful filtering: allow established/related return traffic automatically.

#### In the cloud
- **Security groups** are stateful, attached to instances or interfaces, allow-only.
- **Network ACLs** are stateless and apply per subnet.
- Put databases and internal services in **private subnets** with no public IPs; give them outbound access through a **NAT gateway**.
- Reference security groups from other groups instead of hard-coding IPs.

#### Also worth knowing
Web application firewalls (WAF) for HTTP-level filtering, DDoS protection services, egress filtering, and Kubernetes **NetworkPolicies** for pod-level rules.

#### Pitfalls
Opening SSH (22) or database ports to `0.0.0.0/0`, forgetting that a stateless ACL needs rules for ephemeral return ports, and locking yourself out of a remote host when changing firewall rules (keep a console session open).

**Good enough to move on:** you can lock a VM down to only HTTP/HTTPS publicly and SSH from one IP, and design cloud rules where only the app tier can reach the database.

Key concepts: Stateful vs stateless filtering, nftables / iptables, ufw and firewalld, Cloud security groups, Network ACLs, NAT gateways and private subnets, WAF and DDoS protection.

Mini project: Harden a VM with ufw (default deny, allow 80/443, SSH only from your IP), then verify from another machine with nmap which ports are reachable.

Self-check: Why does a stateless network ACL need an outbound rule for high-numbered ports to let web responses leave?

Resources:
- [nftables wiki](https://wiki.nftables.org/) (netfilter.org)
- [Amazon VPC security](https://docs.aws.amazon.com/vpc/latest/userguide/security.html) (AWS)

### SSH, Bastions and VPNs

core · intermediate · about 4 h · https://www.internhack.in/roadmaps/tracks/devops/ssh-vpn

Access remote machines and private networks securely using SSH keys, jump hosts, tunnels and modern VPNs.

SSH is how you reach servers, and VPNs are how you reach private networks. Both need to be set up securely because they are the front door for attackers too.

#### SSH done right
- Use **key-based auth** (`ssh-keygen -t ed25519`), disable password login and root login in `sshd_config`.
- An **ssh-agent** holds unlocked keys; agent forwarding is convenient but risky on shared hosts.
- `~/.ssh/config` with `Host`, `User`, `IdentityFile` and `ProxyJump` makes access to many hosts painless.
- **Tunnels**: local forward (`-L 5432:db:5432`) to reach a private database, remote forward (`-R`), and dynamic SOCKS (`-D`).
- `scp`, `rsync -avz` and `sftp` for files.

#### Reaching private networks
- **Bastion (jump) hosts** as the single hardened entry point.
- Keyless alternatives: AWS Systems Manager Session Manager, GCP IAP, Azure Bastion, or SSH certificates from a CA.
- **VPNs**: WireGuard (simple, fast), OpenVPN, IPsec for site-to-site, and mesh VPNs like Tailscale.

#### Pitfalls
Sharing one private key across a team, leaving old public keys in `authorized_keys`, and bastions with open-to-the-world SSH and no logging.

**Good enough to move on:** you can reach a database in a private subnet through a jump host with one `ssh` command, and explain why session managers are replacing bastions.

Key concepts: Key-based auth and sshd hardening, ssh config and ProxyJump, Port forwarding and tunnels, rsync and scp, Bastion hosts, Session Manager / IAP, WireGuard and OpenVPN, SSH certificates.

Mini project: Set up two VMs where only one has a public IP, configure ProxyJump in ~/.ssh/config to reach the private one, and open a local tunnel to a database running on it.

Self-check: Why is ssh agent forwarding to a shared bastion considered risky, and what does ProxyJump do differently?

Resources:
- [OpenSSH manual pages](https://www.openssh.com/manual.html) (OpenBSD)
- [WireGuard](https://www.wireguard.com/) (wireguard.com)

## Git and Collaboration Workflows

Everything in DevOps lives in version control: app code, pipelines, infrastructure and even cluster state.

### Git Fundamentals

core · beginner · about 8 h · https://www.internhack.in/roadmaps/tracks/devops/git-fundamentals

Track changes, work on branches, merge and recover from mistakes with Git, the backbone of every pipeline and GitOps workflow.

In DevOps, Git is more than source control. Pipelines trigger on pushes, infrastructure is reviewed as pull requests, and GitOps tools treat a repository as the source of truth for what runs in production.

#### Core model
- A repository is a graph of **commits**; each commit is a snapshot with a parent. **Branches** and **tags** are pointers to commits. `HEAD` is where you are.
- The three areas: working tree, **staging area** (index), and history.
- Everyday commands: `status`, `add -p`, `commit`, `log --oneline --graph`, `diff`, `switch`, `merge`, `rebase`, `pull`, `push`, `fetch`.

#### Recovering
`git restore`, `git reset` (soft, mixed, hard), `git revert` for undoing a pushed commit safely, `git reflog` to find "lost" work, and `git stash`.

#### Hygiene
- Write meaningful commit messages; conventional commits help automate changelogs.
- Use `.gitignore` and never commit secrets. If you do, rotate the secret: rewriting history is not enough.
- Tag releases (`v1.4.0`) so pipelines and rollbacks have stable references.
- Signed commits and pre-commit hooks for linting.

**Good enough to move on:** you can branch, rebase onto main, resolve a conflict, revert a bad commit on a shared branch, and recover a dropped commit with reflog.

Key concepts: Commits, branches and HEAD, Staging and partial commits, Merge vs rebase, Resolving conflicts, revert, reset and reflog, Tags and releases, .gitignore and secret hygiene, pre-commit hooks.

Mini project: Create a repo for your dotfiles or scripts, practise a feature branch with a deliberate merge conflict, revert a commit, and add a pre-commit hook that runs ShellCheck.

Self-check: A teammate pushed a commit with a bug to main. Why should you use git revert instead of git reset there?

Resources:
- [Pro Git](https://git-scm.com/book/en/v2) (git-scm.com)
- [GitHub Docs: Get started](https://docs.github.com/en/get-started) (GitHub)

### Branching Strategies and Pull Requests

core · beginner · about 3 h · https://www.internhack.in/roadmaps/tracks/devops/branching-workflows

Choose a branching model that supports frequent, safe releases and set up reviews and protections around it.

How a team branches decides how often it can release. Long-lived branches mean painful merges and big-bang releases; short-lived branches keep changes small and reviewable.

#### Common models
- **Trunk-based development**: everyone merges small changes into `main` at least daily, often behind feature flags. Best fit for continuous delivery.
- **GitHub flow**: short-lived feature branches plus pull requests into `main`, which is always deployable.
- **GitFlow**: `develop`, `release` and `hotfix` branches. Heavier; suited to versioned products with scheduled releases, rarely needed for web services.
- Release branches for supporting multiple versions at once.

#### Guardrails
- **Branch protection**: required reviews, required status checks, no force pushes to `main`.
- **CODEOWNERS** to route reviews for infra or pipeline files to the right people.
- Merge strategies: merge commit, squash, or rebase. Pick one per repo.
- Monorepo vs polyrepo trade-offs, and path-based CI triggers for monorepos.

#### Pitfalls
Branches that live for weeks, "approve without reading" reviews, and CI that runs only after merge.

**Good enough to move on:** you can defend a branching model for a given team, configure branch protection with required checks, and keep your own branches under a day or two old.

Key concepts: Trunk-based development, GitHub flow, GitFlow, Pull request reviews, Branch protection and required checks, CODEOWNERS, Monorepo vs polyrepo.

Mini project: Configure a GitHub repo with branch protection on main, a CODEOWNERS file, a PR template and a required status check, then open and merge a PR through the full flow.

Self-check: How does trunk-based development ship unfinished features without exposing them to users?

Resources:
- [Trunk Based Development](https://trunkbaseddevelopment.com/) (trunkbaseddevelopment.com)
- [About protected branches](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches) (GitHub)

## Web Servers and Reverse Proxies

Serve static files, terminate TLS and route traffic to applications with a production-grade web server. Learn the concepts, then go deep on one.

### How Web Servers Serve Traffic

core · beginner · about 3 h · https://www.internhack.in/roadmaps/tracks/devops/web-server-concepts

Understand what a web server does in front of an application: static files, virtual hosts, TLS termination, proxying, caching and logging.

Application runtimes like Node, Gunicorn or a Java server are rarely exposed to the internet directly. A web server or reverse proxy sits in front and handles the jobs it is better at.

#### Responsibilities
- **Static content**: serving files efficiently with correct caching headers and compression.
- **Virtual hosts**: many sites on one server, selected by the `Host` header or SNI.
- **TLS termination**: decrypt once at the edge, then forward plain HTTP or re-encrypt.
- **Reverse proxying** to upstream app servers, with timeouts, buffering and retries.
- **Protection**: rate limits, request size limits, basic auth, IP allow lists, security headers.
- **Access and error logs** in a format your log pipeline can parse (JSON is easiest).

#### Architecture choices
Event-driven servers (Nginx, Caddy, HAProxy) handle many connections with few threads; process-per-request models (classic Apache prefork) use more memory. In Kubernetes, these same servers appear as **ingress controllers** and sidecars.

#### Pitfalls
Default timeouts that are too short for uploads or too long for a failing backend, missing `X-Forwarded-Proto` so apps generate http:// links, and config changes applied without a syntax check (`nginx -t`).

**Good enough to move on:** you can describe each hop a request takes from browser to app and which component should own caching, TLS and rate limiting.

Key concepts: Static vs dynamic content, Virtual hosts, TLS termination, Upstreams and timeouts, Compression and caching headers, Security headers, Structured access logs.

Mini project: Sketch and document the request path for a site with a CDN, a load balancer, a web server and two app servers, noting where TLS ends, where logs are written and where caching happens.

Self-check: Why does an app behind a TLS-terminating proxy sometimes redirect users to http:// URLs, and how do you fix it?

Resources:
- [MDN: HTTP caching](https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching) (MDN)
- [What is a reverse proxy?](https://www.cloudflare.com/learning/cdn/glossary/reverse-proxy/) (Cloudflare)

### Nginx

recommended · intermediate · about 8 h · https://www.internhack.in/roadmaps/tracks/devops/nginx

The most widely deployed web server and reverse proxy; learn its config model and the handful of directives that cover most real setups.

**Nginx** is our recommended web server to learn deeply because you will meet it everywhere: on VMs, in Docker images, and as the most common Kubernetes ingress controller.

#### Config model
- Config lives in `/etc/nginx/nginx.conf` plus included files (`conf.d/*.conf` or `sites-enabled/`).
- Blocks nest: `http` > `server` (a virtual host, matched by `listen` and `server_name`) > `location` (matched by path; exact, prefix and regex rules have a precedence order worth learning).
- `proxy_pass http://upstream_name;` with an `upstream` block for load balancing; set `proxy_set_header Host $host;` and the `X-Forwarded-*` headers.

#### Everyday features
- `root` and `try_files` for static sites and single-page apps.
- TLS with `ssl_certificate` and a modern protocol list; HTTP to HTTPS redirects.
- `gzip`, `client_max_body_size`, `proxy_read_timeout`, `limit_req` for rate limiting, `proxy_cache`.
- Custom `log_format` (JSON) for access logs.

#### Operations
Always run `nginx -t` before `systemctl reload nginx`; reload is graceful and keeps connections. Read `error.log` first when something fails.

#### Pitfalls
Trailing slash behaviour in `proxy_pass`, `location` precedence surprises, and `if` inside `location` (it rarely does what you expect).

**Good enough to move on:** you can host a static site and a proxied API on one server with TLS, redirects, gzip, rate limiting and JSON logs.

Key concepts: server and location blocks, proxy_pass and upstreams, TLS and redirects, try_files for SPAs, Rate limiting with limit_req, proxy_cache, nginx -t and graceful reload.

Mini project: Serve a React build and proxy /api to a backend on one Nginx server with Let's Encrypt TLS, HTTP to HTTPS redirect, gzip, a 10 requests per second rate limit on /api, and JSON access logs.

Self-check: What is the difference between proxy_pass http://app; and proxy_pass http://app/; for a location /api/ block?

Resources:
- [nginx documentation](https://nginx.org/en/docs/) (nginx.org)
- [nginx beginner's guide](https://nginx.org/en/docs/beginners_guide.html) (nginx.org)

### Caddy

alternative · intermediate · about 4 h · https://www.internhack.in/roadmaps/tracks/devops/caddy

A modern web server with automatic HTTPS and a very short config format, great for small teams and simple deployments.

**Caddy** is an alternative to Nginx whose headline feature is **automatic HTTPS**: point a domain at the server and Caddy obtains and renews certificates via ACME with no extra tooling.

#### What to learn
- The **Caddyfile** format: a site address followed by directives, for example `reverse_proxy localhost:3000`, `file_server`, `encode gzip`, `handle_path /api/*`.
- The JSON config and admin API for dynamic configuration.
- Load balancing across multiple upstreams with health checks.
- Plugins via `xcaddy` builds (DNS challenge providers, extra auth).

#### Where it fits
Excellent for side projects, internal tools and small services where fewer moving parts matters more than a huge ecosystem. Nginx remains more common in large organisations and job postings, so knowing its concepts still pays off.

#### Pitfalls
Port 80 and 443 must be reachable for the default HTTP challenge, and rate limits from the CA apply if you repeatedly wipe certificate storage.

**Good enough to move on:** you can serve a site and proxy an API with automatic TLS in a Caddyfile of under ten lines.

Key concepts: Caddyfile syntax, Automatic HTTPS, reverse_proxy and load balancing, JSON config and admin API, xcaddy plugins.

Mini project: Deploy two small services on one VM behind Caddy with separate subdomains, automatic certificates, and gzip compression, all in a single Caddyfile checked into git.

Self-check: What must be true about your DNS and firewall for Caddy's automatic HTTPS to succeed on first start?

Resources:
- [Caddy documentation](https://caddyserver.com/docs/) (caddyserver.com)
- [Caddyfile concepts](https://caddyserver.com/docs/caddyfile/concepts) (caddyserver.com)

### HAProxy

alternative · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/devops/haproxy

A high-performance TCP and HTTP load balancer known for reliability, fine-grained health checks and detailed stats.

**HAProxy** focuses on load balancing and proxying rather than serving files. It is used at very high traffic volumes and is a good choice when you need precise control over balancing, health checks and connection handling.

#### What to learn
- Config sections: `global`, `defaults`, `frontend` (where traffic arrives), `backend` (pools of servers), and `listen` (both in one).
- `mode tcp` for layer 4 and `mode http` for layer 7 with **ACLs** to route by host, path or header.
- Balancing algorithms (`roundrobin`, `leastconn`, `source`) and active health checks (`option httpchk`).
- **Stick tables** for rate limiting and session persistence.
- The stats page and runtime API for draining servers during deploys.

#### Where it fits
Great in front of databases (TCP), for large-scale HTTP balancing, and as a Kubernetes ingress option. It does not serve static sites, so it is often paired with a web server or CDN.

**Good enough to move on:** you can balance HTTP across a pool with health checks, route two hostnames to different backends, and drain a server via the runtime API.

Key concepts: frontend and backend sections, TCP vs HTTP mode, ACL routing, Health checks, Stick tables, Stats page and runtime API.

Mini project: Put HAProxy in front of three app containers with leastconn balancing and HTTP health checks, expose the stats page, and drain one server during a simulated deploy.

Self-check: When would you choose mode tcp over mode http in HAProxy?

Resources:
- [HAProxy documentation](https://docs.haproxy.org/) (haproxy.org)
- [HAProxy blog and tutorials](https://www.haproxy.com/blog) (HAProxy Technologies)

### Apache HTTP Server

alternative · intermediate · about 4 h · https://www.internhack.in/roadmaps/tracks/devops/apache

The long-standing web server still common in legacy stacks, shared hosting and PHP applications.

**Apache httpd** powered much of the early web and still runs a large number of sites, especially PHP applications and older enterprise stacks. You are likely to inherit an Apache setup at some point.

#### What to learn
- **Virtual hosts** in `sites-available`/`sites-enabled` (Debian) or `conf.d` (RHEL), enabled with `a2ensite`.
- **Modules** such as `mod_ssl`, `mod_rewrite`, `mod_proxy` and `mod_headers`, enabled with `a2enmod`.
- **MPMs** (prefork, worker, event) and how they affect memory and concurrency. Prefer `event` with PHP-FPM.
- `.htaccess` files: convenient per-directory overrides, but slower and harder to audit than central config.
- `apachectl configtest` before reloading.

#### Where it fits
Maintaining existing Apache deployments, WordPress and PHP hosting, and environments that rely on specific Apache modules. For new services, Nginx or Caddy are usually simpler.

**Good enough to move on:** you can set up a TLS virtual host with a rewrite rule and a reverse proxy, and explain the MPM in use.

Key concepts: Virtual hosts, mod_rewrite and mod_proxy, MPMs: prefork, worker, event, .htaccess trade-offs, PHP-FPM integration.

Mini project: Host a small PHP app under Apache with the event MPM and PHP-FPM, a TLS virtual host, and a rewrite rule that forces HTTPS.

Self-check: Why can heavy use of .htaccess files slow down an Apache server?

Resources:
- [Apache HTTP Server documentation](https://httpd.apache.org/docs/) (Apache)
- [Apache getting started](https://httpd.apache.org/docs/current/getting-started.html) (Apache)

## Containers in Depth

Package applications with everything they need so they run the same on a laptop, in CI and in production.

### Containers and Docker Basics

core · beginner · about 8 h · https://www.internhack.in/roadmaps/tracks/devops/container-fundamentals

Learn what a container really is, how it differs from a VM, and how to run, inspect and manage containers with Docker.

A **container** is a normal Linux process isolated with kernel features: **namespaces** (its own view of PIDs, network, mounts, users) and **cgroups** (limits on CPU and memory). It is not a tiny VM; it shares the host kernel, which is why it starts in milliseconds.

#### Key concepts
- An **image** is a read-only, layered filesystem plus metadata (entrypoint, env, ports). A **container** is a running instance of an image with a thin writable layer on top.
- **OCI** standards mean images built with Docker run on containerd, CRI-O, Podman and Kubernetes.
- Docker architecture: the `docker` CLI talks to the daemon, which uses **containerd** and **runc** underneath.

#### Everyday commands
`docker run -d -p 8080:80 --name web nginx`, `docker ps`, `docker logs -f`, `docker exec -it web sh`, `docker inspect`, `docker stop`/`rm`, `docker images`, `docker system prune`.

#### Data and networking
- **Volumes** persist data beyond the container; **bind mounts** map host paths (great for development).
- **Bridge networks** give containers DNS by name; `host` networking skips isolation.
- Resource limits: `--memory`, `--cpus`.

#### Pitfalls
Storing data in the container layer (lost on removal), running as root by default, and treating containers like pets you SSH into and patch.

**Good enough to move on:** you can explain containers vs VMs, run a multi-container setup on a user-defined network with a volume, and debug a container with logs, exec and inspect.

Key concepts: Namespaces and cgroups, Images vs containers, OCI, containerd and runc, run, exec, logs, inspect, Volumes and bind mounts, Container networking, Resource limits, Podman.

Mini project: Run Postgres with a named volume and a small web app on the same user-defined network, connect them by container name, then delete and recreate the Postgres container and prove the data survived.

Self-check: Why can a container start in under a second when a VM takes much longer, and what does that imply about kernel sharing?

Resources:
- [Docker: Get started](https://docs.docker.com/get-started/) (Docker)
- [Open Container Initiative](https://opencontainers.org/) (OCI)

### Building Good Images

core · intermediate · about 8 h · https://www.internhack.in/roadmaps/tracks/devops/dockerfiles-images

Write Dockerfiles that produce small, fast-building, reproducible and secure images using layers, caching and multi-stage builds.

Image quality directly affects build speed, deploy speed, cost and security. A 1.5 GB image full of compilers is slower to pull and has a larger attack surface than a 60 MB one.

#### Dockerfile essentials
- `FROM`, `WORKDIR`, `COPY`, `RUN`, `ENV`, `ARG`, `EXPOSE`, `USER`, `ENTRYPOINT` vs `CMD`.
- Each instruction creates a **layer**; order them from least to most frequently changing so the **build cache** works. Copy the dependency manifest and install dependencies before copying source.
- Use a **.dockerignore** to keep `node_modules`, `.git` and secrets out of the build context.

#### Multi-stage builds
Build in a full SDK image, then copy only the output into a slim runtime image (`-slim`, Alpine, distroless or `scratch` for static Go binaries).

#### Reproducibility and tagging
Pin base images by version (or digest), tag your images with the **git SHA** plus semantic versions, and avoid relying on `latest` in deployments. BuildKit features such as cache mounts and `docker buildx` for multi-architecture (amd64/arm64) images are worth learning.

#### Runtime correctness
Use exec-form `ENTRYPOINT ["app"]` so signals reach your process, add a `HEALTHCHECK` where useful, run as a non-root `USER`, and log to stdout/stderr.

**Good enough to move on:** you can take a naive Dockerfile and cut its size and rebuild time dramatically, and explain every line.

Key concepts: Dockerfile instructions, Layer caching order, .dockerignore, Multi-stage builds, Slim, distroless and scratch bases, ENTRYPOINT vs CMD and signals, Tagging with git SHA, buildx and multi-arch images.

Mini project: Containerise an app you wrote with a multi-stage Dockerfile, non-root user and .dockerignore, and record image size and cached rebuild time before and after each optimisation.

Self-check: Why does copying the whole source tree before installing dependencies make every rebuild slow?

Resources:
- [Docker Build overview](https://docs.docker.com/build/) (Docker)
- [Dockerfile reference](https://docs.docker.com/reference/dockerfile/) (Docker)

### Container Registries

core · intermediate · about 3 h · https://www.internhack.in/roadmaps/tracks/devops/container-registries

Store, version, secure and distribute images through public and private registries.

A **registry** stores images so CI can push them and servers or clusters can pull them. Choosing and configuring it well affects security, cost and deploy reliability.

#### Options
- Public: **Docker Hub** (note pull rate limits for anonymous users), GitHub Container Registry (`ghcr.io`), Quay.
- Cloud: **Amazon ECR**, Google Artifact Registry, Azure Container Registry. These integrate with cloud IAM so nodes pull without static passwords.
- Self-hosted: **Harbor** (adds scanning, replication, RBAC) or the plain `registry` image.

#### Concepts
- Image reference: `registry/namespace/repo:tag@sha256:digest`. Tags are mutable pointers; **digests** are immutable.
- **Immutable tags** setting prevents overwriting a released version.
- **Lifecycle policies** delete untagged or old images to control storage cost.
- Pull-through caches and mirrors avoid external rate limits and outages.
- Scanning on push and signed images (covered later in supply chain security).

#### Pitfalls
Pulling from Docker Hub in every CI job and hitting rate limits, long-lived registry passwords stored in CI, and deploying by mutable tag so two nodes end up running different code.

**Good enough to move on:** you can push an image from CI to a private registry using short-lived credentials, reference it by digest, and set a lifecycle policy.

Key concepts: Docker Hub and rate limits, Cloud registries (ECR, GAR, ACR), GitHub Container Registry, Tags vs digests, Immutable tags and lifecycle policies, Harbor self-hosted, Pull-through caches.

Mini project: Create a private repository in ECR or GHCR, push an image tagged with the git SHA, pull it on another machine by digest, and configure a policy that removes untagged images after 7 days.

Self-check: Why does deploying by digest give stronger guarantees than deploying by tag?

Resources:
- [Amazon ECR docs](https://docs.aws.amazon.com/ecr/) (AWS)
- [Working with the Container registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry) (GitHub)

### Docker Compose for Multi-Container Apps

core · beginner · about 4 h · https://www.internhack.in/roadmaps/tracks/devops/docker-compose

Describe an app and its dependencies in one YAML file for reproducible local development, testing and small deployments.

**Docker Compose** defines multiple services, networks and volumes in a `compose.yaml` file and starts them together with `docker compose up`. It is the standard way to give every developer the same local stack and to run integration tests in CI.

#### What to learn
- `services` with `image` or `build`, `ports`, `environment`/`env_file`, `volumes`, `depends_on`.
- **Health checks** plus `depends_on: condition: service_healthy` so the app waits for the database to be ready, not just started.
- Named volumes for data and bind mounts for live code reload.
- **Profiles** to start optional services, and override files (`compose.override.yaml`) for per-environment tweaks.
- Commands: `up -d`, `down -v`, `logs -f`, `exec`, `ps`, `build`, `config` to see the merged result.

#### Where it fits
Local development, CI integration tests, demos, and small single-host deployments. For multi-host scheduling, self-healing and rolling updates you need an orchestrator such as Kubernetes.

#### Pitfalls
Committing real secrets in `environment`, relying on startup order without health checks, and `down -v` wiping a database you wanted to keep.

**Good enough to move on:** a new teammate can clone your repo and have the full stack running with one command.

Key concepts: services, networks, volumes, Environment and env files, Health checks and depends_on, Override files and profiles, Compose in CI, Compose Watch for dev.

Mini project: Write a compose.yaml for an app, Postgres, Redis and an Nginx proxy with health-checked startup, then use it in a CI job that runs integration tests against the stack.

Self-check: Why is depends_on alone not enough to guarantee your app can connect to the database on startup?

Resources:
- [Docker Compose overview](https://docs.docker.com/compose/) (Docker)
- [Compose file reference](https://docs.docker.com/reference/compose-file/) (Docker)

### Container Security Essentials

core · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/devops/container-security

Reduce the blast radius of containers by minimising images, dropping privileges and scanning for known vulnerabilities.

Containers improve isolation but are not a security boundary by default. A container running as root with extra capabilities can often break out to the host.

#### Build-time
- Minimal base images (distroless, slim, Alpine) mean fewer packages and fewer CVEs.
- **Scan images** with Trivy, Grype or registry scanners, and fail builds on critical findings that have fixes.
- Never bake secrets into layers; use BuildKit secret mounts for build-time credentials. Anything in a layer can be extracted, even if a later layer deletes it.
- Rebuild regularly so base-image patches land.

#### Run-time
- Run as a **non-root user**, with a **read-only root filesystem** where possible.
- **Drop Linux capabilities** (`--cap-drop ALL`, add back only what is needed), never use `--privileged` casually, and never mount the Docker socket into untrusted containers.
- Keep the default seccomp and AppArmor/SELinux profiles on.
- **Rootless** Docker or Podman reduces host risk further.
- Set memory and CPU limits so one container cannot starve the host.

#### Pitfalls
Scanning once and never again, ignoring scan output because there is too much noise (triage by fixable and exploitable), and trusting random public images.

**Good enough to move on:** your images run as non-root with a read-only filesystem and no extra capabilities, and CI fails on fixable critical vulnerabilities.

Key concepts: Minimal base images, Image scanning (Trivy, Grype), Non-root and read-only rootfs, Linux capabilities, Build secrets, seccomp and AppArmor, Rootless containers.

Mini project: Scan one of your images with Trivy, fix the findings you can by changing base image and packages, then run it with --read-only, --cap-drop ALL and a non-root user and document what had to change.

Self-check: Why is mounting /var/run/docker.sock into a container roughly equivalent to giving it root on the host?

Resources:
- [Docker Engine security](https://docs.docker.com/engine/security/) (Docker)
- [Trivy](https://trivy.dev/) (Aqua Security)
- [OWASP Docker Security Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Docker_Security_Cheat_Sheet.html) (OWASP)

## Orchestrating Containers with Kubernetes

Run containers across many machines with self-healing, scaling, service discovery and declarative rollouts.

### Kubernetes Architecture and kubectl

core · intermediate · about 10 h · https://www.internhack.in/roadmaps/tracks/devops/kubernetes-architecture

Understand the control plane, nodes, the reconciliation loop and the declarative API before touching workloads.

Kubernetes is a platform for running containers across a cluster of machines. Its central idea is **declarative desired state**: you tell the API what should exist, and controllers continuously reconcile reality toward it.

#### Components
- **Control plane**: the **API server** (everything goes through it), **etcd** (the state store), the **scheduler** (places pods on nodes), and the **controller manager** (runs reconciliation loops).
- **Nodes**: the **kubelet** (starts pods via a container runtime like containerd), **kube-proxy** or an eBPF replacement for service networking, and a **CNI** plugin for pod networking.
- Managed offerings (EKS, GKE, AKS) run the control plane for you.

#### Working with the API
- Everything is an object with `apiVersion`, `kind`, `metadata` and `spec`, stored as YAML manifests.
- `kubectl apply -f`, `get`, `describe`, `logs`, `exec`, `port-forward`, `explain`, `get events --sort-by=.lastTimestamp`.
- **Namespaces**, **labels** and **selectors** organise and connect objects.
- Contexts in `~/.kube/config` choose which cluster you talk to.

#### Local practice
kind, minikube or k3d give you a cluster on a laptop in a minute.

#### Pitfalls
Imperative `kubectl edit` changes that drift from git, and running commands against the wrong context (show it in your prompt).

**Good enough to move on:** you can explain what happens from `kubectl apply` to a running container, and debug a pending or crashing pod using describe, events and logs.

Key concepts: API server, etcd, scheduler, controllers, kubelet, runtime and CNI, Declarative manifests and reconciliation, kubectl essentials, Namespaces, labels, selectors, kind / minikube / k3d, Managed Kubernetes (EKS, GKE, AKS), k9s and kubectx.

Mini project: Create a local cluster with kind, deploy a pod with a deliberately wrong image name, and use describe, events and logs to diagnose and fix it; then write down each control plane component that was involved.

Self-check: If you delete a pod created by a Deployment, why does a new one appear, and which component makes that happen?

Resources:
- [Kubernetes documentation](https://kubernetes.io/docs/home/) (kubernetes.io)
- [Kubernetes components](https://kubernetes.io/docs/concepts/overview/components/) (kubernetes.io)
- [kind quick start](https://kind.sigs.k8s.io/) (Kubernetes SIGs)

### Workloads, Probes and Autoscaling

core · intermediate · about 10 h · https://www.internhack.in/roadmaps/tracks/devops/k8s-workloads

Run applications with Deployments, StatefulSets, DaemonSets and Jobs, keep them healthy with probes, and scale them automatically.

Pods are the unit of scheduling, but you almost never create them directly. Higher-level **workload controllers** manage pods for you.

#### Controllers
- **Deployment** (via ReplicaSets): stateless apps with **rolling updates** and `kubectl rollout undo`. Tune `maxSurge` and `maxUnavailable`.
- **StatefulSet**: stable names and per-pod storage for databases and queues.
- **DaemonSet**: one pod per node (log shippers, node agents).
- **Job** and **CronJob**: run-to-completion and scheduled work.

#### Keeping pods healthy
- **Resource requests** (used for scheduling) and **limits** (enforced). Without requests the scheduler is guessing; memory over the limit means an OOM kill.
- **Probes**: `readinessProbe` controls whether a pod receives traffic, `livenessProbe` restarts a stuck container, `startupProbe` protects slow starters.
- Graceful shutdown: handle SIGTERM, set `terminationGracePeriodSeconds`, and a small `preStop` sleep to let endpoints update.
- **PodDisruptionBudgets** keep capacity during node drains.

#### Scaling
The **Horizontal Pod Autoscaler** scales replicas on CPU, memory or custom metrics; the **Cluster Autoscaler** or **Karpenter** adds nodes; KEDA scales on events such as queue length.

#### Pitfalls
Liveness probes that check dependencies (a database blip restarts every pod), no requests set, and CrashLoopBackOff debugging without `kubectl logs --previous`.

**Good enough to move on:** you can deploy an app with requests, limits, three probes, a PDB and an HPA, and do a rolling update and rollback with zero failed requests.

Key concepts: Pods and ReplicaSets, Deployments and rolling updates, StatefulSets and DaemonSets, Jobs and CronJobs, Requests and limits, Readiness, liveness, startup probes, PodDisruptionBudgets, HPA and cluster autoscaling, KEDA event-driven scaling.

Mini project: Deploy an app with 3 replicas, probes, requests/limits and an HPA; run a load test to trigger scaling, then roll out a new version while a script hammers it and confirm zero errors.

Self-check: What is the difference in behaviour between a failing readiness probe and a failing liveness probe?

Resources:
- [Kubernetes workloads](https://kubernetes.io/docs/concepts/workloads/) (kubernetes.io)
- [Configure liveness, readiness and startup probes](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) (kubernetes.io)

### Services, Ingress and Network Policy

core · intermediate · about 8 h · https://www.internhack.in/roadmaps/tracks/devops/k8s-networking

Expose pods reliably inside and outside the cluster and control which pods can talk to each other.

Pods come and go and change IPs, so Kubernetes provides stable networking abstractions on top of them.

#### The pod network
Every pod gets its own IP and can reach every other pod by default. A **CNI plugin** (Calico, Cilium, the cloud VPC CNI) implements this.

#### Services
- **ClusterIP**: a stable virtual IP and DNS name (`my-svc.my-ns.svc.cluster.local`) that load balances to pods matching a label selector.
- **NodePort** exposes a port on every node; **LoadBalancer** asks the cloud for an external load balancer.
- **Headless** services (no cluster IP) for StatefulSets and client-side discovery.
- `kubectl get endpointslices` shows which pods a service actually routes to. Empty endpoints usually means a selector or readiness problem.

#### Ingress and Gateway API
- An **Ingress** object plus an **ingress controller** (ingress-nginx, Traefik, cloud controllers) routes HTTP by host and path and terminates TLS.
- **cert-manager** automates certificates.
- The newer **Gateway API** separates infrastructure and route ownership and is the direction the ecosystem is moving.

#### NetworkPolicy
Default-allow is risky. **NetworkPolicies** (enforced by the CNI) let you default-deny and allow only, for example, frontend to backend on port 8080.

**Good enough to move on:** you can expose two services on different hostnames with TLS, debug a service with no endpoints, and lock a namespace down with a default-deny policy.

Key concepts: Pod networking and CNI, ClusterIP, NodePort, LoadBalancer, Cluster DNS, Ingress controllers, cert-manager, Gateway API, NetworkPolicies.

Mini project: On a local cluster, install ingress-nginx and cert-manager, expose two apps on different hostnames with TLS, then add a default-deny NetworkPolicy and allow only the traffic each app needs.

Self-check: Your service exists but requests hang. kubectl get endpointslices shows no endpoints. What two things would you check first?

Resources:
- [Services, load balancing and networking](https://kubernetes.io/docs/concepts/services-networking/) (kubernetes.io)
- [Gateway API](https://gateway-api.sigs.k8s.io/) (Kubernetes SIGs)
- [cert-manager](https://cert-manager.io/docs/) (cert-manager)

### Configuration, Secrets, Storage and RBAC

core · intermediate · about 8 h · https://www.internhack.in/roadmaps/tracks/devops/k8s-config-storage

Inject configuration and secrets into pods, attach persistent storage, and control who can do what in the cluster.

Twelve-factor apps read config from the environment, and Kubernetes gives you native objects for that, plus storage and access control.

#### Config and secrets
- **ConfigMaps** hold non-sensitive config, mounted as files or env vars.
- **Secrets** hold sensitive values but are only **base64-encoded**, not encrypted, by default. Enable encryption at rest for etcd, restrict access with RBAC, and consider External Secrets Operator or a CSI driver to sync from Vault or a cloud secret manager.
- Changing a ConfigMap does not restart pods using env vars; use a checksum annotation or a reloader.

#### Storage
- **PersistentVolumeClaims** request storage; **StorageClasses** provision it dynamically (EBS, Persistent Disk, Azure Disk) via **CSI drivers**.
- Access modes (ReadWriteOnce vs ReadWriteMany) and reclaim policies (Delete vs Retain).
- Running databases in Kubernetes is possible with operators, but managed databases are often simpler.

#### Access control
- **RBAC**: Roles/ClusterRoles define verbs on resources; RoleBindings grant them to users, groups or **ServiceAccounts**.
- Give each workload its own ServiceAccount, and map it to cloud IAM (IRSA / EKS Pod Identity, GKE Workload Identity) instead of static keys.
- **Pod Security Standards** (restricted, baseline) and admission policies (Kyverno, Gatekeeper) enforce safe defaults.

**Good enough to move on:** you can run an app with config, a secret from an external store, a persistent volume, and a least-privilege ServiceAccount.

Key concepts: ConfigMaps, Secrets and their limits, External Secrets Operator, PV, PVC and StorageClasses, CSI drivers, RBAC and ServiceAccounts, Workload identity to cloud IAM, Pod Security Standards, Kyverno / Gatekeeper policies.

Mini project: Deploy an app that reads a ConfigMap and a Secret, stores uploads on a PVC, and runs with a ServiceAccount that can only read its own ConfigMap; prove with kubectl auth can-i that it cannot list secrets.

Self-check: If Kubernetes Secrets are only base64-encoded, what actually protects them, and what would you add?

Resources:
- [Kubernetes configuration](https://kubernetes.io/docs/concepts/configuration/) (kubernetes.io)
- [Kubernetes storage](https://kubernetes.io/docs/concepts/storage/) (kubernetes.io)
- [Using RBAC authorization](https://kubernetes.io/docs/reference/access-authn-authz/rbac/) (kubernetes.io)

### Packaging with Helm and Kustomize

core · intermediate · about 6 h · https://www.internhack.in/roadmaps/tracks/devops/helm

Template, version and reuse Kubernetes manifests across environments with Helm charts or Kustomize overlays.

Copy-pasting YAML for dev, staging and production does not scale. Two tools dominate manifest management, and most teams use both.

#### Helm
- A **chart** is a package of templated manifests plus `values.yaml` defaults. `helm install`, `upgrade --install`, `rollback`, `uninstall`, and **releases** tracked in the cluster.
- Templates use Go templating (`{{ .Values.image.tag }}`), helpers in `_helpers.tpl`, and conditionals.
- Charts are distributed via repositories or **OCI registries**; you will install most third-party software (ingress-nginx, Prometheus, cert-manager) with Helm.
- `helm template` and `helm lint` render and check charts locally; `helm diff` (plugin) previews changes.

#### Kustomize
- Built into `kubectl apply -k`. No templating: a **base** of plain YAML plus **overlays** that patch it per environment.
- Great for your own apps when you only need small per-environment differences.

#### Choosing
Helm shines for distributing configurable software; Kustomize shines for simple overlays of your own manifests. GitOps tools support both.

#### Pitfalls
Charts with hundreds of values nobody understands, secrets in `values.yaml` committed to git, and `helm upgrade` without checking the rendered diff.

**Good enough to move on:** you can write a chart for your app with per-environment values files, and install a third-party chart with pinned version and custom values.

Key concepts: Charts, values and releases, Go templating in charts, helm upgrade and rollback, OCI chart registries, helm template, lint and diff, Kustomize bases and overlays.

Mini project: Package your app as a Helm chart with values-dev.yaml and values-prod.yaml (different replicas, resources and hostnames), push it to an OCI registry, and install both environments into separate namespaces.

Self-check: When would Kustomize be a better fit than writing a Helm chart for your own service?

Resources:
- [Helm documentation](https://helm.sh/docs/) (helm.sh)
- [Kustomize](https://kubectl.docs.kubernetes.io/references/kustomize/) (Kubernetes SIGs)

### Operators and Custom Resources

optional · advanced · about 8 h · https://www.internhack.in/roadmaps/tracks/devops/k8s-operators

Extend Kubernetes with Custom Resource Definitions and controllers that automate running complex software.

Kubernetes is extensible: you can add your own object types (**Custom Resource Definitions**) and write controllers that reconcile them. An **operator** is a controller that encodes operational knowledge, such as how to provision, back up, upgrade and fail over a database.

#### What to understand
- CRDs define a new `kind` with a schema; custom resources are instances of it.
- A controller watches resources and runs a **reconcile loop**: compare desired and actual state, take one step, requeue.
- Many tools you use are operators: cert-manager, Prometheus Operator, CloudNativePG, Strimzi (Kafka), Argo CD.
- Building your own: **Kubebuilder** or **Operator SDK** (Go), or lighter frameworks like kopf (Python).
- Status conditions, finalizers (cleanup before deletion) and owner references (garbage collection).

#### When to write one
Only when you have repeated, stateful operational logic that plain manifests and Helm cannot express. Most teams consume operators far more than they write them.

#### Pitfalls
Installing operators with cluster-wide permissions without review, and CRD upgrades that break existing resources.

**Good enough to move on:** you can install and operate a third-party operator, read its CRDs, and explain how its reconcile loop behaves when you edit a custom resource.

Key concepts: Custom Resource Definitions, Controllers and reconcile loops, Finalizers and owner references, Using existing operators, Kubebuilder / Operator SDK, kopf for Python.

Mini project: Install the CloudNativePG operator, create a 3-instance Postgres cluster from a single custom resource, then delete the primary pod and watch the operator promote a replica.

Self-check: What problem does a finalizer solve when a custom resource is deleted?

Resources:
- [Operator pattern](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/) (kubernetes.io)
- [The Kubebuilder Book](https://book.kubebuilder.io/) (Kubernetes SIGs)

### Service Mesh

optional · advanced · about 8 h · https://www.internhack.in/roadmaps/tracks/devops/service-mesh

Add mTLS, traffic shaping and consistent telemetry between services without changing application code.

A **service mesh** moves cross-cutting network concerns out of application code and into infrastructure. Proxies (sidecars such as Envoy, or node-level proxies in newer "ambient" designs) handle traffic between services, managed by a control plane.

#### What a mesh gives you
- **Mutual TLS** between services with automatic certificate rotation, plus identity-based authorisation policies.
- **Traffic management**: retries, timeouts, circuit breaking, traffic splitting for canaries, and fault injection.
- **Uniform telemetry**: request rates, errors and latencies for every service-to-service call, plus trace propagation.

#### Options
- **Istio**: most feature-rich; sidecar and ambient modes.
- **Linkerd**: simpler, lightweight, strong defaults.
- **Cilium service mesh** (eBPF based) and **Consul** are other choices.

#### When it is worth it
Many services, strict zero-trust requirements, or advanced progressive delivery. For a handful of services, the operational overhead (extra latency, memory, upgrades, debugging another layer) often outweighs the benefit.

**Good enough to move on:** you can install a mesh on a test cluster, enable mTLS for a namespace, and split traffic 90/10 between two versions of a service.

Key concepts: Sidecar vs ambient data planes, mTLS and service identity, Retries, timeouts, circuit breaking, Traffic splitting, Istio, Linkerd, Cilium service mesh.

Mini project: Install Linkerd or Istio on a kind cluster with a two-service demo app, enable strict mTLS, and shift 10% of traffic to a v2 deployment while watching the golden metrics.

Self-check: What costs does a service mesh add, and at what point would you decide those costs are worth paying?

Resources:
- [Istio documentation](https://istio.io/latest/docs/) (istio.io)
- [Linkerd documentation](https://linkerd.io/docs/) (linkerd.io)

### Beyond Kubernetes: Nomad and ECS

optional · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/devops/nomad-ecs

Know the simpler orchestrators so you can pick the right tool rather than defaulting to Kubernetes for everything.

Kubernetes is powerful but complex. For some teams a simpler orchestrator is the better engineering choice, and you may join a company that already runs one.

#### Amazon ECS
- AWS-native container orchestration: **task definitions** (like a pod spec), **services** (keep N tasks running behind a load balancer) and **clusters**.
- Runs on **Fargate** (serverless, no nodes to manage) or on EC2 instances.
- Tight integration with IAM task roles, ALB, CloudWatch and Secrets Manager. Very little control-plane overhead.

#### HashiCorp Nomad
- A single binary scheduler for containers **and** non-container workloads (raw binaries, Java, VMs).
- Job specs in HCL; integrates with Consul for service discovery and Vault for secrets.
- Simple to operate on-prem or across clouds.

#### Other options
Docker Swarm (simple but little momentum), and platforms such as Google Cloud Run or Azure Container Apps that run containers without cluster management.

#### Choosing
Ask how many services you run, whether you need the Kubernetes ecosystem (operators, Helm charts), which cloud you are on, and how much platform staff you have.

**Good enough to move on:** you can deploy a container behind a load balancer on ECS Fargate or Nomad and argue when that beats Kubernetes.

Key concepts: ECS task definitions and services, Fargate vs EC2 launch types, Nomad jobs and HCL, Cloud Run / Container Apps, Docker Swarm.

Mini project: Deploy the same container image to ECS Fargate behind an ALB, and write a short comparison of the effort versus deploying it to Kubernetes.

Self-check: Name two situations where ECS Fargate or Cloud Run is a better choice than running your own Kubernetes cluster.

Resources:
- [Amazon ECS docs](https://docs.aws.amazon.com/ecs/) (AWS)
- [Nomad documentation](https://developer.hashicorp.com/nomad/docs) (HashiCorp)

## Cloud Platforms

Learn the shared building blocks of public cloud, go deep on one provider, then learn how networking, storage and serverless fit together there.

### Cloud Computing Concepts

core · beginner · about 4 h · https://www.internhack.in/roadmaps/tracks/devops/cloud-concepts

The service models, shared responsibility and regional design that every cloud provider is built on, so each new provider feels familiar.

Every major cloud sells the same basic ideas under different names. Learn the ideas first and the product catalogue becomes a lookup exercise instead of a memorisation exercise.

#### Service models
- **IaaS**: you rent virtual machines, disks and networks and manage the OS yourself (EC2, Azure VMs, Compute Engine).
- **PaaS / managed services**: the provider runs the platform, you bring code or data (managed databases, App Service, Cloud Run).
- **SaaS**: finished software you configure, not operate.
- **Serverless**: you pay per request or per second, and capacity scales to zero.

#### The shared responsibility model
The provider secures the physical data centres, hypervisors and managed service internals. You are still responsible for identity, network exposure, OS patching on VMs, encryption settings and your data. Most real cloud breaches are misconfigurations on the customer side: a public bucket, an open security group, a leaked access key.

#### Geography and failure domains
A **region** is a metro area with several isolated **availability zones** (separate power and networking). Spread anything important across at least two zones. Multi-region is far more expensive and only needed for strict latency or disaster recovery goals.

#### Pricing basics
You pay for compute time, storage, requests and, often painfully, **data transfer out** and between zones. Reserved or committed-use discounts and spot/preemptible capacity can cut compute bills dramatically.

**Good enough to move on:** you can explain IaaS vs PaaS vs serverless with one example each, describe who patches what under shared responsibility, and say why a single-zone design is a risk.

Key concepts: IaaS, PaaS, SaaS and serverless, Shared responsibility model, Regions and availability zones, Elasticity and autoscaling, Pricing models: on-demand, reserved, spot, Data transfer costs, Well-Architected frameworks.

Mini project: Write a one-page design for hosting a small web app on any cloud: which service model you picked for each piece, how many zones, and a rough monthly cost from the provider's pricing calculator.

Self-check: Your app runs on VMs in a managed cloud. Who is responsible for patching the kernel, and who is responsible for the hypervisor?

Resources:
- [What is cloud computing?](https://aws.amazon.com/what-is-cloud-computing/) (AWS)
- [AWS Well-Architected](https://aws.amazon.com/architecture/well-architected/) (AWS)
- [Cloud Architecture Center](https://cloud.google.com/architecture) (Google Cloud)

### AWS Core Services

recommended · intermediate · about 20 h · https://www.internhack.in/roadmaps/tracks/devops/aws-core

The dozen AWS services that show up in almost every production account: IAM, VPC, EC2, S3, RDS, ELB, Route 53, CloudWatch and friends.

AWS has the largest market share and the most job postings, which is why we recommend it as your first cloud. You do not need to know hundreds of services; a small core covers most real systems.

#### The core set
- **IAM**: users, roles, policies. Humans should use SSO; workloads should assume **roles**, never long-lived access keys.
- **VPC**: subnets, route tables, internet and NAT gateways, security groups.
- **EC2** with **Auto Scaling groups** and **launch templates** for VMs.
- **ELB**: Application Load Balancer for HTTP, Network Load Balancer for TCP/UDP.
- **S3** for object storage, with bucket policies and Block Public Access switched on.
- **RDS / Aurora** for managed relational databases, **DynamoDB** for key-value at scale.
- **Route 53** for DNS, **ACM** for free TLS certificates.
- **CloudWatch** for metrics, logs and alarms, **CloudTrail** for an audit log of every API call.
- **ECR, ECS, EKS** for containers, **Lambda** for functions.

#### Working habits
Use the **AWS CLI** with named profiles and `aws sts get-caller-identity` to confirm who you are. Tag every resource with owner, environment and cost centre. Set a **billing budget alert** on day one of any personal account. Separate environments into different **accounts** under AWS Organizations rather than mixing them in one.

#### Certifications
The Cloud Practitioner is a gentle start; the Solutions Architect Associate is the one employers recognise for DevOps roles.

**Good enough to move on:** you can build a VPC with public and private subnets, run an app on EC2 behind an ALB with an RDS database in private subnets, and explain every IAM permission it needs.

Key concepts: IAM users, roles and policies, VPC, subnets and gateways, EC2 and Auto Scaling groups, S3 buckets and policies, RDS and DynamoDB, ALB / NLB load balancers, Route 53 and ACM, CloudWatch and CloudTrail, AWS Organizations and multi-account, AWS CLI and profiles.

Mini project: Deploy a two-tier app by hand in the console, then again with the CLI: ALB in public subnets, two EC2 instances in private subnets across two AZs, RDS in isolated subnets, and a budget alarm.

Self-check: Why should an EC2 instance get permissions from an instance profile role rather than an access key in a config file?

Resources:
- [AWS documentation](https://docs.aws.amazon.com/) (AWS)
- [AWS Skill Builder](https://skillbuilder.aws/) (AWS)
- [IAM best practices](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html) (AWS)

### Microsoft Azure Core Services

alternative · intermediate · about 20 h · https://www.internhack.in/roadmaps/tracks/devops/azure-core

Azure's equivalents of the core cloud building blocks, and the Entra ID and resource-group model that make Azure different.

Azure is the natural choice in companies that already run on Microsoft: Windows servers, Active Directory, Office 365 and .NET. The concepts match other clouds, but the organisation model is its own.

#### How Azure is organised
- **Microsoft Entra ID** (formerly Azure AD) is the identity plane for people and apps.
- **Management groups > subscriptions > resource groups > resources.** A resource group is a lifecycle boundary: delete the group and everything in it goes.
- **Azure RBAC** assigns roles (Reader, Contributor, Owner or custom) at any of those scopes.
- **Managed identities** let VMs, functions and containers call other Azure services without secrets.

#### Core services
- **Virtual Network (VNet)**, subnets, Network Security Groups and Azure Firewall.
- **Virtual Machines** and **Virtual Machine Scale Sets**.
- **Storage accounts**: Blob, Files, Queues and Tables.
- **Azure SQL Database**, **Azure Database for PostgreSQL**, **Cosmos DB**.
- **Application Gateway** (L7) and **Azure Load Balancer** (L4), **Front Door** for global entry.
- **AKS** for Kubernetes, **Container Apps** and **App Service** for simpler hosting, **Functions** for serverless.
- **Azure Monitor** with Log Analytics and Application Insights.
- **Key Vault** for secrets, keys and certificates.

#### Tooling
The `az` CLI, **Bicep** (Azure's native IaC language) and Azure DevOps or GitHub Actions for pipelines.

**Good enough to move on:** you can create a resource group containing a VNet, a VM scale set behind a load balancer and a managed database, grant a managed identity access to Key Vault, and tear it all down by deleting the group.

Key concepts: Entra ID and Azure RBAC, Subscriptions and resource groups, VNets and network security groups, VMs and scale sets, Storage accounts and Blob, Azure SQL and Cosmos DB, AKS, App Service and Functions, Azure Monitor and Key Vault, Bicep and the az CLI.

Mini project: Host a small web app on App Service with an Azure Database for PostgreSQL backend, store its connection string in Key Vault, and read it through a managed identity.

Self-check: What is the difference between a subscription and a resource group, and which would you use to separate production from development?

Resources:
- [Azure documentation](https://learn.microsoft.com/en-us/azure/) (Microsoft)
- [Microsoft Learn: Azure training](https://learn.microsoft.com/en-us/training/azure/) (Microsoft)

### Google Cloud Core Services

alternative · intermediate · about 20 h · https://www.internhack.in/roadmaps/tracks/devops/gcp-core

Google Cloud's project-based model and its strongest services: GKE, Cloud Run, BigQuery and a global VPC.

Google Cloud (GCP) is popular with data-heavy teams and with companies that want a very good managed Kubernetes. Its networking and project model are cleaner than most, which makes it pleasant to learn.

#### How GCP is organised
- **Organization > folders > projects > resources.** The project is the main unit of billing, quota and permissions.
- **IAM** binds principals (users, groups, **service accounts**) to roles at any level. Prefer predefined roles over the broad basic roles (Owner, Editor, Viewer).
- **Workload Identity** lets GKE pods act as service accounts without key files.

#### Core services
- **VPC networks are global**; subnets are regional. Firewall rules use network tags or service accounts as targets.
- **Compute Engine** VMs and **managed instance groups**.
- **Cloud Storage** buckets with uniform bucket-level access.
- **Cloud SQL**, **AlloyDB**, **Spanner**, **Firestore**.
- **Cloud Load Balancing**: one global anycast IP in front of backends in many regions.
- **GKE** (Standard or Autopilot), **Cloud Run** for containers that scale to zero, **Cloud Functions**.
- **Cloud Logging** and **Cloud Monitoring**, **Secret Manager**.
- **BigQuery** and **Pub/Sub** for data pipelines.

#### Tooling
The `gcloud` CLI, Cloud Shell in the browser, and Terraform, which Google supports heavily.

**Good enough to move on:** you can create a project with a custom VPC, deploy a container to Cloud Run and to GKE Autopilot, connect it to Cloud SQL with a least-privilege service account, and read its logs.

Key concepts: Projects, folders and billing, IAM and service accounts, Global VPC and firewall rules, Compute Engine and instance groups, Cloud Storage, Cloud SQL and Firestore, GKE and Cloud Run, Cloud Logging and Monitoring, BigQuery and Pub/Sub.

Mini project: Deploy an API to Cloud Run connected to Cloud SQL, with its own service account that can only reach that one database and one Secret Manager secret.

Self-check: Why is a GCP VPC described as global, and how does that change how you design multi-region networking compared with AWS?

Resources:
- [Google Cloud documentation](https://cloud.google.com/docs) (Google Cloud)
- [Google Cloud Skills Boost](https://www.cloudskillsboost.google/) (Google Cloud)

### Cloud Networking and Storage Design

core · intermediate · about 8 h · https://www.internhack.in/roadmaps/tracks/devops/cloud-networking-storage

How to lay out VPCs, connect them to each other and to on-premises, and choose the right block, file or object storage for each workload.

Once you can click together a VPC, the next step is designing networks and storage that survive growth, audits and outages.

#### Network design
- **Plan CIDR ranges up front.** Overlapping ranges make peering and VPNs impossible later. Reserve a large block per environment and region.
- **Subnet tiers**: public (load balancers, NAT), private (apps), isolated (databases, no internet route).
- **Egress control**: NAT gateways are convenient but cost money per GB; VPC endpoints / Private Link keep traffic to managed services off the internet and off the NAT bill.
- **Connecting networks**: peering for a few VPCs, a **transit gateway** or hub-and-spoke for many, site-to-site VPN or a dedicated link (Direct Connect, ExpressRoute, Interconnect) for on-premises.
- **Private DNS** zones so services find each other by name.

#### Storage types
- **Block** (EBS, managed disks, persistent disks): attached to one VM, used for databases and boot volumes. Snapshots are your backup primitive.
- **File** (EFS, Azure Files, Filestore): shared POSIX filesystems for many clients.
- **Object** (S3, Blob, Cloud Storage): virtually unlimited, cheap, accessed over HTTP. Use **lifecycle rules** to move old data to colder tiers and **versioning** to survive accidental deletes.

#### CDN and edge
Put a CDN (CloudFront, Front Door, Cloud CDN) in front of static assets and public APIs to cut latency and origin load.

**Good enough to move on:** you can draw a multi-account or multi-VPC network with non-overlapping ranges, justify NAT vs private endpoints, and pick the storage type for a database, a shared upload folder and a log archive.

Key concepts: CIDR planning across environments, Public, private and isolated subnets, NAT gateways and private endpoints, Peering and transit gateways, Site-to-site VPN and dedicated links, Block, file and object storage, Lifecycle rules and storage tiers, CDN in front of origins.

Mini project: Design and build two VPCs (shared-services and app) with non-overlapping ranges, connect them, give the app subnet an S3 endpoint instead of NAT for bucket traffic, and add a lifecycle rule on the bucket.

Self-check: Your NAT gateway bill jumped after a new service started pulling large files from object storage. What change fixes that without opening the subnet to the internet?

Resources:
- [Amazon VPC user guide](https://docs.aws.amazon.com/vpc/latest/userguide/) (AWS)
- [Amazon S3 user guide](https://docs.aws.amazon.com/AmazonS3/latest/userguide/) (AWS)
- [VPC network overview](https://cloud.google.com/vpc/docs/overview) (Google Cloud)

### Serverless and Managed Compute

core · intermediate · about 6 h · https://www.internhack.in/roadmaps/tracks/devops/serverless

Run code as functions or scale-to-zero containers, wired to events, and learn where serverless shines and where it hurts.

Serverless means you never manage servers or clusters: you hand the platform code or a container image, and it runs, scales and bills per invocation or per second.

#### The main shapes
- **Functions as a Service**: AWS Lambda, Azure Functions, Google Cloud Functions. Short-lived handlers triggered by events.
- **Serverless containers**: Cloud Run, Azure Container Apps, AWS Fargate and App Runner. Any container, scaled on HTTP requests or queue depth.
- **Serverless data services**: DynamoDB, Aurora Serverless, S3, SQS, EventBridge, Pub/Sub.

#### Event-driven design
Functions shine when glued to events: an object lands in a bucket, a message arrives on a queue, a cron schedule fires, an API Gateway route is called. Design handlers to be **idempotent** (the same event may arrive twice), keep them small, and push failures to a **dead-letter queue**.

#### Operational realities
- **Cold starts** add latency when a new instance boots; mitigate with smaller packages, provisioned concurrency or min instances.
- **Limits**: execution timeouts, payload sizes and concurrency quotas.
- **Observability** needs structured logs and tracing because you cannot SSH in.
- **Cost** is tiny at low volume but can exceed a container at steady high load.
- Package and deploy with IaC (Terraform, SAM, Serverless Framework, CDK), not console uploads.

**Good enough to move on:** you can build an event pipeline with a queue, a function and a dead-letter queue, explain cold starts, and estimate when a steady workload would be cheaper on containers.

Key concepts: Functions as a Service, Serverless containers, Event sources and triggers, API gateways, Idempotency and dead-letter queues, Cold starts and concurrency limits, SAM, CDK and Serverless Framework.

Mini project: Build an image-thumbnail pipeline: upload to a bucket triggers a function that writes a resized copy to a second bucket, with failures routed to a dead-letter queue and an alarm on it.

Self-check: A queue-triggered function occasionally processes the same message twice. Why does that happen, and how do you make it harmless?

Resources:
- [AWS Lambda developer guide](https://docs.aws.amazon.com/lambda/latest/dg/) (AWS)
- [Cloud Run documentation](https://cloud.google.com/run/docs) (Google Cloud)
- [Azure Functions documentation](https://learn.microsoft.com/en-us/azure/azure-functions/) (Microsoft)

## Infrastructure as Code

Describe servers, networks and cloud resources in version-controlled code, then configure machines repeatably with configuration management.

### Infrastructure as Code Principles

core · beginner · about 3 h · https://www.internhack.in/roadmaps/tracks/devops/iac-concepts

Why infrastructure belongs in code, the difference between declarative and imperative tools, and the provisioning vs configuration split.

Clicking in a console does not scale: nobody can review it, repeat it or roll it back. **Infrastructure as Code (IaC)** stores the desired state of your infrastructure in files, reviews changes through pull requests, and applies them with a tool.

#### Declarative vs imperative
- **Declarative** tools (Terraform, CloudFormation, Kubernetes manifests) describe the end state; the tool works out the steps.
- **Imperative** scripts describe steps; rerunning them may break things unless you write the checks yourself.
Declarative tools are **idempotent** by design: applying the same code twice changes nothing the second time.

#### Two layers of work
- **Provisioning** creates resources: networks, VMs, databases, DNS records, IAM roles. Terraform, Pulumi, CloudFormation, Bicep.
- **Configuration management** configures what runs inside machines: packages, files, users, services. Ansible, Chef, Puppet, Salt.
With containers and immutable images, configuration management shrinks: you bake an image once (Packer, Dockerfile) and replace machines instead of patching them.

#### Practices that matter
- **Drift**: changes made outside the code. Detect it and either import or revert it.
- **Environments from the same code** with different inputs, not copy-pasted folders.
- **Plan before apply**, and have a second person review the plan.
- **Small blast radius**: split state so one mistake cannot delete everything.
- **Immutable infrastructure**: replace, do not mutate.

**Good enough to move on:** you can explain idempotency, drift and immutable infrastructure, and say which tool category you would use to create a VPC and which to install a package on a VM.

Key concepts: Declarative vs imperative, Idempotency, Provisioning vs configuration management, Drift detection, Immutable infrastructure and golden images, Packer for machine images.

Mini project: Take something you built by hand in the cloud console, write down every setting you chose, and list which parts would become provisioning code and which configuration code.

Self-check: Someone changed a security group rule in the console after it was created by code. What is this called, and what are your two options for fixing it?

Resources:
- [What is Infrastructure as Code with Terraform?](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/infrastructure-as-code) (HashiCorp)
- [Packer documentation](https://developer.hashicorp.com/packer/docs) (HashiCorp)

### Terraform and OpenTofu

recommended · intermediate · about 18 h · https://www.internhack.in/roadmaps/tracks/devops/terraform

Provision cloud resources declaratively with HCL, providers, state and modules, using the most widely adopted IaC tool.

**Terraform** is the default IaC tool in most job descriptions, and **OpenTofu** is its open-source fork with the same language and workflow. Learn one and you know both.

#### The workflow
`terraform init` downloads providers, `plan` shows a diff between code and reality, `apply` makes it so, `destroy` removes it. Always read the plan: a line starting with `-/+` means replace, which for a database means data loss.

#### Language building blocks
- **Providers** talk to APIs (aws, azurerm, google, kubernetes, github, cloudflare).
- **Resources** create things; **data sources** read things that already exist.
- **Variables**, **locals** and **outputs** make code reusable.
- `count` and `for_each` create many similar resources; prefer `for_each` with stable keys.
- **Modules** package resources into reusable units with inputs and outputs. Pin module and provider versions.

#### State
Terraform records what it manages in a **state file**. In a team, store it in a **remote backend** (S3 with locking, Azure Storage, GCS, or HCP Terraform) so two people cannot apply at once. State can contain secrets: encrypt it and restrict access. Use `terraform import` or `import` blocks to adopt existing resources, and `moved` blocks to refactor without destroying.

#### Structuring real projects
Split state by environment and by layer (network, data, apps) to keep plans fast and blast radius small. Run `fmt`, `validate`, **tflint** and a security scanner (Checkov, Trivy) in CI, and post the plan on the pull request.

**Good enough to move on:** you can write a module used by two environments, keep state in a locked remote backend, import an existing resource, and explain why a plan wants to replace something.

Key concepts: init, plan, apply, destroy, Providers, resources and data sources, Variables, locals and outputs, count and for_each, Modules and version pinning, Remote state and locking, import and moved blocks, Workspaces vs directory per environment, tflint, Checkov and plan in CI, OpenTofu compatibility.

Mini project: Rebuild your two-tier cloud app in Terraform: a network module and an app module, dev and prod using different variable files, state in a remote backend with locking, and a CI job that posts the plan on each pull request.

Self-check: What problem does state locking solve, and what could go wrong if two engineers applied from their laptops at the same time without it?

Resources:
- [Terraform documentation](https://developer.hashicorp.com/terraform/docs) (HashiCorp)
- [Terraform tutorials](https://developer.hashicorp.com/terraform/tutorials) (HashiCorp)
- [OpenTofu documentation](https://opentofu.org/docs/) (OpenTofu)

### Pulumi

alternative · intermediate · about 10 h · https://www.internhack.in/roadmaps/tracks/devops/pulumi

Infrastructure as code written in general-purpose languages like TypeScript, Python or Go, with real loops, functions and tests.

**Pulumi** takes the same declarative model as Terraform (desired state, a preview, then an update) but lets you write it in TypeScript, Python, Go, C# or Java instead of HCL.

#### Why teams pick it
- Real programming constructs: functions, classes, loops, packages from your language's ecosystem.
- Unit tests with your normal test framework.
- **Component resources** package patterns (a "service" with its load balancer, DNS and alarms) as ordinary classes.
- Developers who already write TypeScript or Python can contribute without learning a new language.

#### Core concepts
- A **project** holds code; a **stack** is one deployed instance of it (dev, staging, prod) with its own config.
- `pulumi preview` shows the diff, `pulumi up` applies it.
- **Outputs** are values known only after deployment; use `apply` to transform them.
- **Secrets** in stack config are encrypted.
- State lives in Pulumi Cloud or a self-managed backend such as a bucket.

#### Trade-offs
Flexibility cuts both ways: code can become too clever to review. Keep infrastructure programs boring, avoid side effects, and still review the preview in pull requests. The ecosystem and hiring pool are smaller than Terraform's, though Pulumi can use many Terraform providers.

**Good enough to move on:** you can create a stack per environment, build a reusable component in your language of choice, and write a unit test that asserts a bucket is not public.

Key concepts: Projects and stacks, preview and up, Inputs, outputs and apply, Component resources, Stack config and secrets, Unit testing infrastructure.

Mini project: Write a Pulumi program in TypeScript or Python that creates a static website bucket with a CDN, packaged as a component, plus a unit test that fails if the bucket allows public writes.

Self-check: Why can you not simply print a resource's ID inside a Pulumi program before deployment, and what mechanism handles that?

Resources:
- [Pulumi documentation](https://www.pulumi.com/docs/) (Pulumi)
- [Pulumi concepts](https://www.pulumi.com/docs/iac/concepts/) (Pulumi)

### CloudFormation, CDK and Bicep

alternative · intermediate · about 8 h · https://www.internhack.in/roadmaps/tracks/devops/cloudformation-cdk

The cloud providers' own IaC tools: AWS CloudFormation and CDK, and Azure Bicep, deeply integrated with a single cloud.

Each large cloud offers a native IaC service. They cover one provider only, but they are supported from day one for new features and need no separate state to manage.

#### AWS CloudFormation
- Templates in YAML or JSON declare **resources**, **parameters** and **outputs**.
- A **stack** is a deployed template; AWS stores its state for you.
- **Change sets** preview what an update will do, like a Terraform plan.
- Failed updates **roll back** automatically.
- **StackSets** deploy the same template across many accounts and regions.
- **Drift detection** compares stacks with reality.

#### AWS CDK
The **Cloud Development Kit** lets you write TypeScript, Python, Java or Go that synthesises CloudFormation. Higher-level **constructs** create sensible defaults (a load-balanced Fargate service in a few lines). `cdk diff` and `cdk deploy` wrap the change-set workflow.

#### Azure Bicep
A concise language that compiles to ARM templates. Deploy with `az deployment group create`, preview with **what-if**, and share modules through registries.

#### When to choose native tools
Pick them when you are all-in on one cloud and want zero extra infrastructure, or when an organisation standard requires it. Choose Terraform or Pulumi when you manage several providers (cloud plus DNS plus GitHub plus monitoring) from one codebase.

**Good enough to move on:** you can deploy and update a stack with a change set or what-if preview, explain automatic rollback, and argue native vs multi-cloud IaC for a given company.

Key concepts: CloudFormation templates and stacks, Change sets and rollback, StackSets, AWS CDK constructs, Azure Bicep and what-if, Native vs multi-cloud IaC.

Mini project: Build the same S3 bucket plus Lambda function twice, once as a raw CloudFormation template and once with CDK, and compare template size, readability and the change-set output for a small edit.

Self-check: A CloudFormation update fails halfway through. What happens to the resources it already changed?

Resources:
- [AWS CloudFormation user guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/) (AWS)
- [AWS CDK developer guide](https://docs.aws.amazon.com/cdk/v2/guide/) (AWS)
- [Bicep documentation](https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/) (Microsoft)

### Configuration Management with Ansible

core · intermediate · about 10 h · https://www.internhack.in/roadmaps/tracks/devops/ansible

Configure fleets of servers over SSH with agentless, idempotent playbooks, roles and inventories.

**Ansible** is the most common configuration management tool because it needs no agent: it connects over SSH (or WinRM), pushes small modules, runs them and reports what changed.

#### Core pieces
- **Inventory**: which hosts exist and how they are grouped (`web`, `db`, `prod`). Static files or **dynamic inventory** plugins that query your cloud.
- **Modules**: idempotent units of work such as `apt`, `dnf`, `copy`, `template`, `user`, `systemd`, `lineinfile`.
- **Playbooks**: YAML lists of **plays**, each mapping hosts to **tasks**.
- **Handlers**: tasks that run only when notified, for example restart nginx only if its config changed.
- **Variables and facts**: host, group and role variables, plus facts gathered from each machine.
- **Templates**: Jinja2 files rendered per host.
- **Roles and collections**: reusable, shareable packages of tasks, templates and defaults.

#### Good habits
- Prefer purpose-built modules over `shell`; if you must use `shell`, add `creates` or `changed_when` so reruns stay idempotent.
- Run with `--check --diff` before real changes.
- Store secrets with **Ansible Vault** or a secret manager lookup.
- Lint with **ansible-lint** and test roles with **Molecule**.

#### Where it fits today
Ansible bootstraps VMs, patches fleets, configures network gear and runs ad-hoc operations. In container-first shops it is used less for apps and more for base images and legacy servers.

**Good enough to move on:** you can write a role that installs and configures nginx from a template, restarts it only on change, runs cleanly twice in a row, and targets hosts from a dynamic cloud inventory.

Key concepts: Inventories and dynamic inventory, Playbooks, plays and tasks, Modules and idempotency, Handlers, Variables, facts and Jinja2 templates, Roles and collections, Ansible Vault, ansible-lint and Molecule.

Mini project: Write an Ansible role that hardens a fresh Linux VM (users, SSH config, firewall, automatic updates) and installs nginx from a template, then prove idempotency by running it twice and showing zero changes.

Self-check: Why is using the shell module to run apt-get install a worse choice than the apt module, even if both install the package?

Resources:
- [Ansible documentation](https://docs.ansible.com/) (Red Hat)
- [Ansible getting started](https://docs.ansible.com/ansible/latest/getting_started/index.html) (Red Hat)

### Chef, Puppet and Salt

optional · advanced · about 4 h · https://www.internhack.in/roadmaps/tracks/devops/chef-puppet

Agent-based configuration management tools still found in large and long-lived enterprise fleets.

Before Ansible and containers took over, large companies managed thousands of servers with **agent-based** tools. Many still do, so recognising them is useful even if you never start a new project with them.

#### How agent-based tools work
An agent on every node checks in with a central server on a schedule, pulls its desired configuration, applies it and reports back. This gives **continuous enforcement**: if someone edits a file by hand, the next run puts it back. The cost is running and upgrading the server and agents.

#### The main tools
- **Puppet**: a declarative DSL of **resources** grouped into **classes** and **modules**; **Hiera** separates data from code; the **PuppetDB** stores facts and reports.
- **Chef**: Ruby-based **recipes** grouped into **cookbooks**, with **roles** and **environments**; Chef Infra Client runs on nodes. Test Kitchen and InSpec cover testing and compliance.
- **Salt**: a fast event bus between a master and **minions**, with **states** in YAML and remote execution built in; can also run agentless over SSH.

#### Working with them as a newcomer
Learn to read a manifest or cookbook, find where a setting comes from (node data, role, environment), and do a dry run (`puppet agent --noop`, `chef-client --why-run`). Migrations away from these tools usually move base configuration into images and app configuration into containers.

**Good enough to move on:** you can explain push vs pull configuration management, read a simple Puppet manifest or Chef recipe, and describe how you would migrate one role to Ansible or an image build.

Key concepts: Pull-based agents and convergence, Puppet manifests, modules and Hiera, Chef recipes and cookbooks, Salt states and minions, Dry runs and compliance checks.

Mini project: Write the same small configuration (a user, a package and a config file) as an Ansible role and as a Puppet manifest, then write a paragraph comparing push vs pull enforcement.

Self-check: Someone edits a config file by hand on a Puppet-managed node. What happens at the next agent run, and how is that different from an Ansible-managed node?

Resources:
- [Puppet documentation](https://www.puppet.com/docs) (Puppet)
- [Chef documentation](https://docs.chef.io/) (Progress Chef)
- [Salt documentation](https://docs.saltproject.io/) (Salt Project)

## CI/CD Pipelines and Release Strategies

Automate build, test and deploy on every change, store what you build, and release it to users safely.

### Continuous Integration and Delivery

core · beginner · about 3 h · https://www.internhack.in/roadmaps/tracks/devops/ci-cd-concepts

What CI, continuous delivery and continuous deployment mean, and the stages a healthy pipeline runs through.

A pipeline turns every commit into evidence: does it build, do the tests pass, is it safe to ship? The faster and more reliable that evidence, the more often a team can release.

#### Three related terms
- **Continuous integration (CI)**: everyone merges small changes to the main branch often, and every push is built and tested automatically.
- **Continuous delivery**: every change that passes the pipeline is releasable; a human presses the button.
- **Continuous deployment**: passing changes go to production automatically, with no button.

#### Typical stages
1. **Checkout and dependency restore**, with caching.
2. **Lint and static checks** (formatters, type checks, IaC validation).
3. **Unit tests**, then **build** an artifact or container image once.
4. **Security scans**: dependencies, secrets, image vulnerabilities.
5. **Publish** the artifact with an immutable version (commit SHA or semantic version).
6. **Deploy to staging**, run integration or smoke tests.
7. **Promote the same artifact** to production, never rebuild it.

#### What makes a pipeline good
- Fast feedback: aim for minutes on pull requests; parallelise and cache.
- Deterministic builds: pinned dependencies and tool versions.
- **Build once, deploy many**: identical bits in every environment, config injected at deploy time.
- Pipeline definitions live in the repository and are reviewed like code.
- Flaky tests are fixed or quarantined, never ignored.

**Good enough to move on:** you can draw the stages of a pipeline for a containerised service, explain delivery vs deployment, and say why production should get the exact artifact staging tested.

Key concepts: CI vs continuous delivery vs deployment, Pipeline stages, Build once, deploy many, Caching and parallelism, Artifact versioning, Environment promotion, Flaky test handling.

Mini project: Draw the complete pipeline for one of your projects from push to production, marking which stages run on pull requests, which on main, and where the artifact is built and promoted.

Self-check: Why is rebuilding the container image separately for production a bad idea, even from the same commit?

Resources:
- [Continuous integration](https://martinfowler.com/articles/continuousIntegration.html) (Martin Fowler)
- [DORA capabilities: continuous delivery](https://dora.dev/capabilities/continuous-delivery/) (DORA)

### GitHub Actions

recommended · intermediate · about 8 h · https://www.internhack.in/roadmaps/tracks/devops/github-actions

Build pipelines as YAML workflows triggered by repository events, using jobs, reusable actions, secrets and OIDC to the cloud.

**GitHub Actions** is built into GitHub, free for public repositories and generous for private ones, which makes it the easiest first CI system to learn.

#### Building blocks
- **Workflows** are YAML files in `.github/workflows/`, triggered by events such as `push`, `pull_request`, `schedule`, `workflow_dispatch` or `release`.
- **Jobs** run on **runners** (GitHub-hosted Linux, Windows or macOS, or self-hosted) and run in parallel unless linked with `needs`.
- **Steps** either `run` shell commands or `uses` an **action** from the marketplace, such as `actions/checkout` and `actions/setup-node`.
- A **matrix** fans a job out across versions or operating systems.
- **Caching** (`actions/cache` or built-in setup caches) and **artifacts** pass files between jobs.

#### Secrets and cloud access
Store credentials as **secrets** and read them with `${{ secrets.NAME }}`. Better still, use **OIDC**: the workflow requests a short-lived token and assumes a cloud role, so no long-lived keys exist at all. Scope the default `GITHUB_TOKEN` with `permissions:`.

#### Deployments
**Environments** add required reviewers, wait timers and environment-specific secrets. **Concurrency groups** stop two deploys of the same environment running together.

#### Reuse and hardening
- **Reusable workflows** (`workflow_call`) and **composite actions** remove copy-paste across repos.
- Pin third-party actions to a full commit SHA.
- Be careful with `pull_request_target` and untrusted input in scripts.

**Good enough to move on:** you can write a workflow that lints, tests across a matrix, builds and pushes an image, and deploys to a protected environment using OIDC with no stored cloud keys.

Key concepts: Workflows, events and triggers, Jobs, steps and runners, Marketplace actions, Matrix builds, Caching and artifacts, Secrets and OIDC to cloud, Environments and approvals, Reusable workflows and composite actions, Self-hosted runners.

Mini project: Create a workflow for a containerised app: test on pull requests, build and push to a registry on main tagged with the commit SHA, then deploy to a staging environment and, after manual approval, to production using OIDC.

Self-check: What does OIDC federation remove from your repository settings, and why is that a security win?

Resources:
- [GitHub Actions documentation](https://docs.github.com/en/actions) (GitHub)
- [Security hardening for GitHub Actions](https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions) (GitHub)

### GitLab CI/CD

alternative · intermediate · about 7 h · https://www.internhack.in/roadmaps/tracks/devops/gitlab-ci

Pipelines defined in .gitlab-ci.yml with stages, jobs, runners and environments, tightly integrated with GitLab's registry and security tools.

**GitLab CI/CD** ships inside GitLab, whether on gitlab.com or self-managed, and is common in companies that host their own source control.

#### Pipeline structure
- A single `.gitlab-ci.yml` at the repo root defines **stages** (build, test, deploy) and **jobs** assigned to them.
- Jobs in the same stage run in parallel; stages run in order. **needs** builds a directed graph so jobs can start early.
- `rules` decide when a job runs (branch, tag, merge request, changed paths).
- `image` sets the container a job runs in; `services` start sidecars such as a test database.
- `cache` speeds up dependency installs; `artifacts` pass build outputs to later jobs.

#### Runners
**GitLab Runner** executes jobs using executors such as Docker, Kubernetes or shell. Shared runners are fine to start; register your own for special hardware or network access.

#### Delivery features
- **Environments** and **deployments** track what is running where, with manual jobs (`when: manual`) for approvals.
- Built-in **container registry** and package registry.
- **CI/CD variables** at project, group or instance level, with masking and protection for protected branches.
- `include` and **CI/CD components** share pipeline templates across projects.
- Security scanning templates (SAST, dependency, container) plug straight in.

**Good enough to move on:** you can write a multi-stage pipeline with rules, caching, a service container for tests and a manual production deploy, and share part of it through an include.

Key concepts: .gitlab-ci.yml stages and jobs, rules and needs, Images and services, Cache vs artifacts, GitLab Runner executors, Environments and manual jobs, include and CI/CD components.

Mini project: Build a GitLab pipeline that tests against a Postgres service container, builds an image into the GitLab registry, and deploys to staging automatically and to production through a manual job.

Self-check: What is the difference between cache and artifacts in GitLab CI, and which would you use for a compiled binary needed by the deploy job?

Resources:
- [GitLab CI/CD documentation](https://docs.gitlab.com/ee/ci/) (GitLab)
- [CI/CD YAML syntax reference](https://docs.gitlab.com/ee/ci/yaml/) (GitLab)

### Jenkins

alternative · intermediate · about 7 h · https://www.internhack.in/roadmaps/tracks/devops/jenkins

The long-standing self-hosted automation server, with pipelines as code in Jenkinsfiles and a huge plugin ecosystem.

**Jenkins** is open source, self-hosted and extremely flexible. It predates cloud CI services, so it runs in countless enterprises, and maintaining it is a common DevOps task.

#### Architecture
- A **controller** schedules work and hosts the UI; **agents** (static VMs, Docker containers or Kubernetes pods) run the builds.
- Features come from **plugins**: Git, credentials, Kubernetes agents, Blue Ocean, and hundreds more. Plugins are both the strength and the main maintenance burden.

#### Pipelines as code
A `Jenkinsfile` in the repository defines the pipeline:
- **Declarative** syntax: `pipeline { agent ..., stages { stage('Test') { steps { ... } } } }`, with `post` blocks for cleanup and notifications.
- **Scripted** syntax is full Groovy, more powerful but harder to review.
- **Multibranch pipelines** discover branches and pull requests automatically.
- **Shared libraries** keep common steps in one versioned repository.

#### Running Jenkins well
- Never run builds on the controller; use ephemeral agents.
- Configure the instance as code with **Configuration as Code (JCasC)** and pin plugin versions.
- Store secrets in the credentials store or an external vault, and bind them only to the steps that need them.
- Back up `JENKINS_HOME`, keep plugins patched and restrict script approval.

**Good enough to move on:** you can run Jenkins in a container with Kubernetes or Docker agents, write a declarative multibranch Jenkinsfile, and explain how you would keep the instance patched and reproducible.

Key concepts: Controller and agents, Declarative Jenkinsfile, Multibranch pipelines, Credentials and secret binding, Shared libraries, Configuration as Code (JCasC), Plugin management.

Mini project: Run Jenkins with JCasC in Docker, add an ephemeral Docker or Kubernetes agent, and create a multibranch pipeline that tests, builds an image and archives test reports.

Self-check: Why should builds never run on the Jenkins controller itself?

Resources:
- [Jenkins user documentation](https://www.jenkins.io/doc/) (Jenkins)
- [Pipeline syntax](https://www.jenkins.io/doc/book/pipeline/syntax/) (Jenkins)

### Artifact and Package Management

core · intermediate · about 4 h · https://www.internhack.in/roadmaps/tracks/devops/artifact-management

Store, version, promote and clean up the build outputs your pipelines produce: images, packages, binaries and charts.

A pipeline's output is an **artifact**: a container image, a JAR, a wheel, an npm package, a Helm chart, a static bundle or a binary. Where and how you store artifacts decides whether you can reproduce, roll back and audit releases.

#### Repositories
- **Container registries**: ECR, GCR/Artifact Registry, ACR, GHCR, Harbor.
- **Universal repository managers**: JFrog Artifactory and Sonatype Nexus host many formats (Maven, npm, PyPI, Docker, Helm, generic).
- **Cloud package services**: AWS CodeArtifact, Google Artifact Registry, Azure Artifacts, GitHub Packages.
- **Proxy / remote repositories** cache public registries such as npm and Docker Hub so builds survive upstream outages and rate limits.

#### Versioning
- Tag with something immutable: **semantic versions** for libraries, commit SHA or build number for services. Treat `latest` as a convenience, never as a deploy target.
- Deploy container images by **digest** (`image@sha256:...`) when you need a guarantee.
- Make tags immutable in the registry so nobody can overwrite a release.

#### Promotion and retention
Promote the same artifact through repositories or tags (dev, staging, prod) rather than rebuilding. Attach metadata: commit, pipeline run, test results, SBOM and signature. Set **retention policies** to delete untagged images and old snapshots, or storage bills climb silently.

**Good enough to move on:** you can set up a registry with immutable tags and a cleanup policy, configure a proxy cache for a public package ecosystem, and trace a running image back to the commit and pipeline run that built it.

Key concepts: Artifact types and formats, Artifactory and Nexus, Proxy caches for public registries, Semantic versioning and SHA tags, Immutable tags and digests, Promotion between environments, Retention and cleanup policies.

Mini project: Run Nexus or Artifactory locally, configure a proxy for npm or PyPI and a hosted Docker repository, point a CI build at it, and add a cleanup rule for untagged images.

Self-check: Two deploys used the image tag app:1.4 but behaved differently. How could that happen, and how do digests prevent it?

Resources:
- [Semantic Versioning](https://semver.org/) (semver.org)
- [Sonatype Nexus Repository docs](https://help.sonatype.com/en/sonatype-nexus-repository.html) (Sonatype)
- [Artifact Registry documentation](https://cloud.google.com/artifact-registry/docs) (Google Cloud)

### Deployment Strategies and Feature Flags

core · intermediate · about 6 h · https://www.internhack.in/roadmaps/tracks/devops/deployment-strategies

Release changes with rolling, blue-green and canary deployments, decouple deploy from release with feature flags, and roll back fast.

Deploying is putting new code on servers; **releasing** is exposing it to users. Good strategies keep those separate and limit how many users a bad change can hurt.

#### Strategies
- **Recreate**: stop old, start new. Simple, but causes downtime.
- **Rolling**: replace instances a few at a time (Kubernetes Deployments do this by default with `maxSurge` and `maxUnavailable`). Old and new versions run side by side briefly, so they must be compatible.
- **Blue-green**: run a full new environment (green) next to the current one (blue), test it, then switch traffic at the load balancer or DNS. Rollback is switching back. Costs double capacity during the switch.
- **Canary**: send a small slice of traffic (1%, 5%, 25%) to the new version, compare error rates and latency with the baseline, and continue or abort. Tools such as **Argo Rollouts** and **Flagger** automate the analysis.
- **Shadow / mirroring**: copy live traffic to the new version without returning its responses.

#### Feature flags
Wrap new behaviour in a flag so code can ship dark and be turned on per user, percentage or region, without a deploy. Flags enable trunk-based development, quick kill switches and A/B tests. Services include LaunchDarkly, Unleash, Flagsmith and the vendor-neutral **OpenFeature** SDK. Remove flags once a feature is fully launched, or they become debt.

#### Making rollbacks boring
Keep database migrations backward compatible (expand, migrate, contract), keep the previous artifact ready, and automate rollback on failed health checks.

**Good enough to move on:** you can choose a strategy for a given service and explain its cost, run a canary with automated metric checks, and ship a feature behind a flag with a kill switch.

Key concepts: Deploy vs release, Recreate and rolling updates, Blue-green deployments, Canary releases and analysis, Traffic mirroring, Feature flags and OpenFeature, Argo Rollouts and Flagger, Automated rollback.

Mini project: On a local Kubernetes cluster, install Argo Rollouts and run a canary that shifts traffic in steps and aborts automatically when a Prometheus error-rate query crosses a threshold. Add a feature flag to toggle one endpoint without redeploying.

Self-check: Why must old and new versions be compatible during a rolling update, and what does that imply for database schema changes?

Resources:
- [Kubernetes: performing a rolling update](https://kubernetes.io/docs/tutorials/kubernetes-basics/update/update-intro/) (kubernetes.io)
- [Argo Rollouts](https://argoproj.github.io/argo-rollouts/) (Argo Project)
- [OpenFeature documentation](https://openfeature.dev/docs/reference/intro) (OpenFeature)

## GitOps and Secrets Management

Make Git the source of truth for what runs in your clusters, and handle credentials without ever committing them in plain text.

### GitOps Principles

core · intermediate · about 3 h · https://www.internhack.in/roadmaps/tracks/devops/gitops-principles

A deployment model where the desired state lives in Git and an in-cluster agent continuously pulls and reconciles it.

**GitOps** applies the infrastructure-as-code idea to deployments: the desired state of every environment is stored in Git, and software agents continuously make reality match it.

#### The four principles
1. **Declarative**: the whole system is described with manifests, Helm charts or Kustomize overlays.
2. **Versioned and immutable**: that description lives in Git, so every change has an author, a review and a history.
3. **Pulled automatically**: an agent inside the cluster pulls changes; CI no longer needs cluster admin credentials.
4. **Continuously reconciled**: the agent detects **drift** and corrects it, or at least alerts.

#### Push CI vs pull GitOps
In push-based CD, the pipeline runs `kubectl apply` or `helm upgrade` and needs powerful credentials. In GitOps, CI builds and pushes an image, then updates an image tag in a **config repository**; the cluster agent does the rest. Rolling back becomes `git revert`.

#### Repository layouts
- **App repo vs config repo**: keep source code and environment manifests separate so deploy history is clean.
- Directory per environment (`envs/dev`, `envs/prod`) with Kustomize overlays or Helm values files.
- **Promotion** is a pull request that copies a version from one environment folder to the next.
- Automated **image updaters** can open those pull requests for you.

#### Limits
Secrets need a separate solution, ordering between resources needs care, and non-Kubernetes resources require extra tooling (Crossplane, Terraform controllers).

**Good enough to move on:** you can explain push vs pull deployment, design an app-plus-config repository layout for three environments, and describe how a rollback works in GitOps.

Key concepts: OpenGitOps principles, Push vs pull deployment, App repo vs config repo, Environment overlays and promotion, Drift detection and self-healing, Image update automation.

Mini project: Create a config repository with base manifests and dev and prod Kustomize overlays for a sample app, and write the pull-request flow that promotes a new image tag from dev to prod.

Self-check: In a GitOps setup, someone runs kubectl edit on a production Deployment. What happens next, and why is that desirable?

Resources:
- [OpenGitOps principles](https://opengitops.dev/) (CNCF OpenGitOps)
- [Kustomize documentation](https://kubectl.docs.kubernetes.io/) (Kubernetes SIG CLI)

### Argo CD

recommended · intermediate · about 6 h · https://www.internhack.in/roadmaps/tracks/devops/argo-cd

A Kubernetes-native GitOps controller with a rich UI that syncs Applications from Git and shows health and drift at a glance.

**Argo CD** is the most widely used GitOps tool. It runs in the cluster, watches Git repositories and keeps Kubernetes resources in sync with them.

#### Core concepts
- An **Application** points at a repo, a path (plain YAML, Kustomize or a Helm chart) and a destination cluster and namespace.
- **Sync status** says whether the live state matches Git; **health status** says whether resources are actually working (Deployments rolled out, pods ready).
- **Sync policies**: manual, or automated with **prune** (delete resources removed from Git) and **self-heal** (undo manual changes).
- **Projects** restrict which repos, clusters and namespaces a team's Applications may use.

#### Managing many apps
- **App of apps**: one Application that creates others.
- **ApplicationSet** generates Applications from templates across clusters, directories or pull requests (preview environments).
- **Sync waves** and **hooks** order resources, for example run a migration Job before the Deployment.

#### Operating it
- Log in with SSO and map groups to RBAC roles; avoid sharing the admin password.
- Register external clusters for a hub-and-spoke setup.
- Pair it with **Argo Rollouts** for canary releases and **Argo CD Image Updater** or Renovate for tag bumps.
- Use the `argocd` CLI or the UI diff view to see exactly what a sync will change.

**Good enough to move on:** you can install Argo CD, deploy an app with automated sync, prune and self-heal, generate per-environment Applications with an ApplicationSet, and restrict a team with a Project.

Key concepts: Applications and sources, Sync and health status, Automated sync, prune and self-heal, Projects and RBAC, App of apps and ApplicationSets, Sync waves and hooks, Multi-cluster management.

Mini project: Install Argo CD on a local cluster, deploy an app from your config repo with self-heal on, then prove it works by deleting a Deployment by hand and watching Argo CD recreate it.

Self-check: What is the difference between an Application being OutOfSync and being Degraded?

Resources:
- [Argo CD documentation](https://argo-cd.readthedocs.io/en/stable/) (Argo Project)
- [Argo CD getting started](https://argo-cd.readthedocs.io/en/stable/getting_started/) (Argo Project)

### Flux

alternative · intermediate · about 6 h · https://www.internhack.in/roadmaps/tracks/devops/flux

A lightweight, composable GitOps toolkit made of Kubernetes controllers for sources, Kustomize, Helm and image automation.

**Flux** is a CNCF graduated GitOps project. Instead of one application with a UI, it is a set of small controllers you configure entirely with Kubernetes custom resources, which suits teams that like everything as code.

#### The toolkit
- **Source controller**: `GitRepository`, `OCIRepository`, `HelmRepository` and `Bucket` objects fetch artifacts on an interval.
- **Kustomize controller**: `Kustomization` objects apply a path from a source, with pruning, health checks and `dependsOn` ordering.
- **Helm controller**: `HelmRelease` objects install and upgrade charts declaratively, with automatic rollback on failure.
- **Notification controller**: sends events to Slack or Teams and receives webhooks to trigger immediate syncs.
- **Image automation controllers**: scan registries and commit new tags back to Git by policy (for example latest semver in 1.x).

#### Getting started
`flux bootstrap github` installs Flux and commits its own manifests to your repository, so Flux manages itself from then on. A typical layout has `clusters/<name>` directories that point at shared `infrastructure` and `apps` folders.

#### Flux vs Argo CD
Both reconcile Git into clusters. Argo CD offers a strong UI and an application-centric model; Flux is lighter, CLI and CRD driven, and has native image automation and SOPS decryption. Many teams choose on UI needs and multi-tenancy style.

**Good enough to move on:** you can bootstrap Flux into a cluster, deploy a Helm chart through a HelmRelease, order infrastructure before apps with dependsOn, and set up an image policy that bumps a tag in Git.

Key concepts: flux bootstrap, GitRepository and OCIRepository sources, Kustomization and dependsOn, HelmRelease, Image automation, Notifications and webhooks.

Mini project: Bootstrap Flux from a GitHub repository, install an ingress controller via HelmRelease in an infrastructure layer, deploy your app in an apps layer that depends on it, and enable image automation for the app.

Self-check: Why does Flux commit its own installation manifests to your repository during bootstrap?

Resources:
- [Flux documentation](https://fluxcd.io/flux/) (Flux)
- [Flux get started](https://fluxcd.io/flux/get-started/) (Flux)

### Secrets Management Fundamentals

core · intermediate · about 3 h · https://www.internhack.in/roadmaps/tracks/devops/secrets-management

What counts as a secret, why it must never live in Git or images, and the patterns for storing, delivering and rotating credentials.

A **secret** is anything that grants access: passwords, API keys, tokens, private keys, database URLs with credentials, signing keys. Leaked secrets are one of the most common causes of breaches, and they usually leak through Git history, container images, CI logs or chat.

#### Rules to live by
- Never commit secrets, even to private repos. If one is committed, **rotate it**; deleting the commit is not enough.
- Never bake secrets into images or pass them as build arguments.
- Mask secrets in CI logs and avoid `set -x` around them.
- Give each workload its **own** credentials with the least privilege it needs.
- Prefer **short-lived, dynamic credentials** over long-lived static ones.

#### Where secrets live
- **Cloud secret managers**: AWS Secrets Manager and Parameter Store, Azure Key Vault, Google Secret Manager.
- **Dedicated vaults** such as HashiCorp Vault or OpenBao.
- **Encrypted files in Git** with SOPS or Sealed Secrets, decrypted only at deploy time.
- **Kubernetes Secrets** are only base64 encoded; enable encryption at rest and restrict RBAC.

#### Getting secrets to apps
Environment variables are simple but leak into crash dumps and child processes; mounted files are slightly safer and can be refreshed. Identity-based access (cloud IAM roles, workload identity) lets apps fetch secrets without a bootstrap secret at all.

#### Detection
Run scanners such as **gitleaks** or **trufflehog** in pre-commit hooks and CI, and enable push protection on your Git host.

**Good enough to move on:** you can explain why rotating beats deleting, list three storage options with trade-offs, and add secret scanning to a repository.

Key concepts: What counts as a secret, Leak paths: Git, images, logs, Cloud secret managers, Env vars vs mounted files, Rotation and short-lived credentials, Kubernetes Secret encryption at rest, Secret scanning with gitleaks.

Mini project: Add gitleaks to a pre-commit hook and CI for one of your repositories, move an app's database password into a cloud secret manager, and have the app read it through its IAM role.

Self-check: A developer pushed an API key and force-pushed to remove the commit a minute later. Is the key safe? What do you do?

Resources:
- [OWASP Secrets Management Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html) (OWASP)
- [Kubernetes Secrets](https://kubernetes.io/docs/concepts/configuration/secret/) (kubernetes.io)
- [AWS Secrets Manager user guide](https://docs.aws.amazon.com/secretsmanager/latest/userguide/) (AWS)

### HashiCorp Vault

recommended · advanced · about 7 h · https://www.internhack.in/roadmaps/tracks/devops/vault

A central secrets platform with identity-based auth, dynamic credentials, encryption as a service and detailed audit logs.

**Vault** (and its open-source fork **OpenBao**) goes beyond storing key-value pairs: it issues credentials on demand, encrypts data for applications and records every access.

#### Core concepts
- **Seal and unseal**: Vault starts sealed; its master key is split (Shamir) or held by a cloud KMS (**auto-unseal**).
- **Auth methods** prove identity: Kubernetes service accounts, cloud IAM, OIDC for humans, AppRole for machines.
- **Policies** in HCL grant paths and capabilities (`read`, `create`, `list`). Default deny.
- **Tokens** carry policies and a **TTL**; everything expires unless renewed.
- **Audit devices** log every request and response (with secrets hashed).

#### Secrets engines
- **KV v2**: versioned static secrets.
- **Database**: creates a unique database user per request with a short lease, then drops it. No shared passwords.
- **Cloud engines** (AWS, Azure, GCP) issue short-lived cloud credentials.
- **PKI**: an internal certificate authority issuing short-lived TLS certificates.
- **Transit**: encryption as a service; apps send plaintext and get ciphertext without ever holding the key.

#### Getting secrets into workloads
The **Vault Agent** sidecar or injector writes secrets to files and renews them; the **Secrets Store CSI driver** or **External Secrets Operator** syncs them into Kubernetes; apps can also call the API directly.

#### Running it
Run at least three nodes with integrated **Raft** storage, enable auto-unseal, back up snapshots, and treat the root token as break-glass only.

**Good enough to move on:** you can run Vault in dev mode, authenticate a Kubernetes pod through the Kubernetes auth method, and have it fetch dynamic database credentials that expire after an hour.

Key concepts: Seal, unseal and auto-unseal, Auth methods, Policies and tokens, KV v2 secrets engine, Dynamic database credentials, PKI and Transit engines, Vault Agent and injector, Raft storage and HA, OpenBao fork.

Mini project: Deploy Vault to a local Kubernetes cluster, configure Kubernetes auth and the database secrets engine for Postgres, and inject short-lived credentials into an app pod with the Vault Agent injector.

Self-check: Why are dynamic database credentials safer than a single shared password stored in Vault's KV engine?

Resources:
- [Vault documentation](https://developer.hashicorp.com/vault/docs) (HashiCorp)
- [Vault tutorials](https://developer.hashicorp.com/vault/tutorials) (HashiCorp)
- [OpenBao documentation](https://openbao.org/docs/) (OpenBao)

### SOPS, Sealed Secrets and External Secrets

core · intermediate · about 4 h · https://www.internhack.in/roadmaps/tracks/devops/sops-external-secrets

GitOps-friendly ways to keep secrets in or near Git safely: encrypted files, cluster-sealed secrets, and operators that sync from secret managers.

GitOps wants everything in Git, but secrets must not be readable there. Three patterns solve this, and most teams pick one.

#### SOPS
**SOPS** encrypts the *values* in YAML, JSON, ENV or INI files while leaving keys readable, so diffs still make sense. Keys come from **age**, PGP or a cloud KMS. A `.sops.yaml` file sets which keys encrypt which paths. Decrypt at deploy time: Flux decrypts natively, Argo CD can via plugins, and Terraform and Helm have integrations. Access is controlled by who can use the KMS key.

#### Sealed Secrets
The **Sealed Secrets** controller holds a private key inside the cluster. You encrypt with the public key using `kubeseal`, commit the resulting `SealedSecret`, and only that cluster can decrypt it into a normal Secret. Simple, but secrets are tied to one cluster and the controller key must be backed up.

#### External Secrets Operator
**ESO** keeps the real values in a secret manager (AWS Secrets Manager, Vault, Azure Key Vault, Google Secret Manager). You commit an `ExternalSecret` that references a key, and the operator creates and refreshes the Kubernetes Secret. Rotation happens in one place, and Git holds no ciphertext at all. A `SecretStore` or `ClusterSecretStore` configures access, ideally through workload identity.

#### Choosing
- Small team, one cluster: Sealed Secrets or SOPS with age.
- Already on a cloud secret manager or Vault: External Secrets Operator.
- Need secrets for non-Kubernetes tools too: SOPS.

**Good enough to move on:** you can encrypt a values file with SOPS and age, create a SealedSecret, and sync a secret from a cloud secret manager with External Secrets, and explain which you would pick for a given team.

Key concepts: SOPS with age or KMS, .sops.yaml creation rules, Sealed Secrets and kubeseal, External Secrets Operator, SecretStore and workload identity, Choosing a pattern.

Mini project: In your GitOps config repo, store one secret with SOPS, one as a SealedSecret and one via External Secrets from a cloud secret manager, then document the rotation steps for each.

Self-check: Your cluster is destroyed and rebuilt. Which of the three approaches can recover its secrets without extra steps, and which needs a backed-up key?

Resources:
- [SOPS](https://getsops.io/) (CNCF SOPS)
- [External Secrets Operator](https://external-secrets.io/latest/) (External Secrets)
- [Sealed Secrets](https://github.com/bitnami-labs/sealed-secrets) (Bitnami Labs)

## Observability: Metrics, Logs, Traces and SLOs

Instrument systems so you can tell when they are unhealthy and why, alert on what users feel, and manage reliability with SLOs.

### Observability Fundamentals

core · intermediate · about 3 h · https://www.internhack.in/roadmaps/tracks/devops/observability-fundamentals

The three main telemetry signals, what each is good for, and the RED and USE methods for deciding what to measure.

**Monitoring** tells you that something is wrong; **observability** is the ability to ask new questions of your system and find out why, without shipping new code. Both rest on telemetry.

#### The signals
- **Metrics**: numeric time series (request rate, latency percentiles, CPU). Cheap to store and ideal for dashboards and alerts.
- **Logs**: timestamped event records. Rich detail for debugging a specific failure. Emit **structured** logs (JSON with consistent fields), not free text.
- **Traces**: the path of one request across services, made of timed **spans**. Show where latency and errors come from in distributed systems.
- **Profiles** and **events** (deploys, config changes) are increasingly treated as signals too.
Link them: put the **trace ID** in every log line and attach exemplars to metrics.

#### What to measure
- **RED** for request-driven services: **Rate**, **Errors**, **Duration**.
- **USE** for resources: **Utilisation**, **Saturation**, **Errors** (CPU, memory, disk, network, connection pools).
- Google's **four golden signals**: latency, traffic, errors, saturation.
- Business signals: sign-ups, checkouts, jobs processed.

#### Cardinality and cost
Every unique combination of metric labels is a new time series. Labels such as user ID or full URL explode storage and cost. Keep high-cardinality detail in logs and traces, and sample traces sensibly.

#### Pull vs push
Prometheus **scrapes** targets; many SaaS agents and OpenTelemetry **push** to collectors. Both work; know which your stack uses when debugging missing data.

**Good enough to move on:** you can say which signal answers a given question, list the RED metrics for an API and the USE metrics for a database host, and explain why user ID should not be a metric label.

Key concepts: Monitoring vs observability, Metrics, logs and traces, Structured logging, RED and USE methods, Four golden signals, Cardinality and cost, Correlating signals with trace IDs.

Mini project: For a service you run, write a telemetry plan: the RED metrics with label sets, the log fields every line must carry, and three questions you want traces to answer.

Self-check: Latency alerts fire but CPU and memory look fine. Which signal would you look at next, and what would you expect to find?

Resources:
- [Monitoring Distributed Systems (SRE Book)](https://sre.google/sre-book/monitoring-distributed-systems/) (Google SRE)
- [OpenTelemetry: observability primer](https://opentelemetry.io/docs/concepts/observability-primer/) (OpenTelemetry)

### Prometheus and Grafana

core · intermediate · about 10 h · https://www.internhack.in/roadmaps/tracks/devops/prometheus-grafana

Collect metrics with Prometheus, query them with PromQL, and build dashboards in Grafana that people actually use.

**Prometheus** is the standard open-source metrics system, especially in Kubernetes, and **Grafana** is the standard way to visualise it.

#### How Prometheus works
- It **scrapes** HTTP `/metrics` endpoints on an interval and stores samples in a local time-series database.
- Targets come from static config or **service discovery** (Kubernetes, EC2, Consul).
- **Exporters** expose metrics for things that do not speak Prometheus: `node_exporter` for hosts, `blackbox_exporter` for probes, exporters for Postgres, Redis and nginx.
- Metric types: **counter** (only goes up), **gauge** (goes up and down), **histogram** and **summary** (distributions).

#### PromQL essentials
- `rate(http_requests_total[5m])`: per-second rate of a counter.
- `sum by (status) (...)`: aggregate across labels.
- `histogram_quantile(0.95, sum by (le) (rate(http_request_duration_seconds_bucket[5m])))`: p95 latency.
- **Recording rules** precompute expensive queries; **alerting rules** fire when an expression holds for a duration.

#### In Kubernetes
The **kube-prometheus-stack** Helm chart installs the Prometheus Operator, Alertmanager, Grafana and ready-made dashboards. `ServiceMonitor` and `PodMonitor` objects declare what to scrape.

#### Scaling and retention
A single Prometheus is not built for years of data or global views. **Thanos**, **Grafana Mimir** or **VictoriaMetrics** add long-term storage and federation; managed options exist on every cloud.

#### Grafana
Build dashboards around questions (is the service healthy? where is time spent?), use **variables** for environment and service, store dashboards as JSON in Git, and add deploy **annotations**.

**Good enough to move on:** you can instrument an app, scrape it in Kubernetes with a ServiceMonitor, write PromQL for rate, error ratio and p95 latency, and build a RED dashboard with variables.

Key concepts: Scraping and service discovery, Metric types, Exporters, PromQL: rate, sum, histogram_quantile, Recording and alerting rules, kube-prometheus-stack and ServiceMonitors, Grafana dashboards and variables, Long-term storage: Thanos, Mimir.

Mini project: Install kube-prometheus-stack on a local cluster, expose custom request metrics from a small app, scrape them with a ServiceMonitor, and build a Grafana dashboard showing rate, error percentage and p95 latency per endpoint.

Self-check: Why do you apply rate() to a counter instead of graphing its raw value?

Resources:
- [Prometheus documentation](https://prometheus.io/docs/introduction/overview/) (Prometheus)
- [Querying Prometheus](https://prometheus.io/docs/prometheus/latest/querying/basics/) (Prometheus)
- [Grafana documentation](https://grafana.com/docs/grafana/latest/) (Grafana Labs)

### Centralised Logging with Loki

recommended · intermediate · about 6 h · https://www.internhack.in/roadmaps/tracks/devops/loki-logging

Ship logs from every host and pod to Grafana Loki, a cost-efficient log store that indexes labels rather than full text.

When services run on many machines and pods come and go, `ssh` plus `grep` stops working. You need logs shipped off each host to a central store. **Grafana Loki** is our default pick for new setups because it is cheap to run and fits naturally next to Prometheus and Grafana.

#### How Loki is different
Loki indexes only a small set of **labels** (namespace, app, pod, level) and stores log lines compressed in object storage. Queries first select streams by label, then filter the text. That makes storage cheap, but it means you must keep labels low-cardinality, just like Prometheus.

#### The pipeline
1. Apps write structured logs to **stdout/stderr** (in containers) or files.
2. An agent collects them: **Grafana Alloy**, Promtail (older), Fluent Bit or the OpenTelemetry Collector. In Kubernetes it runs as a DaemonSet and adds pod metadata as labels.
3. Loki stores them in object storage (S3, GCS, Azure Blob) with a retention policy.
4. You explore in Grafana with **LogQL**.

#### LogQL basics
- `{namespace="shop", app="api"} |= "error"`: select streams, filter lines.
- `| json | status >= 500`: parse JSON fields and filter on them.
- `sum by (app) (rate({namespace="shop"} |= "timeout" [5m]))`: turn logs into metrics for dashboards and alerts.

#### Good logging practice
Log in JSON with consistent keys (`level`, `msg`, `trace_id`, `service`), never log secrets or full personal data, avoid logging every successful request at high volume, and set retention per environment.

**Good enough to move on:** you can deploy Loki with an agent on a cluster, find all 5xx errors for one service in the last hour with LogQL, jump from a log line to its trace, and set a retention policy.

Key concepts: Label-based indexing, Log agents: Alloy, Fluent Bit, Kubernetes log collection, LogQL filters and parsers, Metrics from logs, Object storage and retention, Logging hygiene and PII.

Mini project: Add Loki and a log agent to your local monitoring stack, make your app emit JSON logs with trace IDs, and build a Grafana panel that counts errors per service from logs.

Self-check: Why would adding request_id as a Loki label be a mistake, and how do you search for a request ID instead?

Resources:
- [Grafana Loki documentation](https://grafana.com/docs/loki/latest/) (Grafana Labs)
- [LogQL](https://grafana.com/docs/loki/latest/query/) (Grafana Labs)
- [Fluent Bit documentation](https://docs.fluentbit.io/manual) (Fluent Bit)

### Elastic Stack (ELK) and OpenSearch

alternative · intermediate · about 7 h · https://www.internhack.in/roadmaps/tracks/devops/elk-stack

Full-text indexed logging and search with Elasticsearch or OpenSearch, Logstash or Beats for ingestion, and Kibana for exploration.

The **ELK stack** (Elasticsearch, Logstash, Kibana, plus Beats) was the first widely adopted open log platform and is still common, as is its fork **OpenSearch** with OpenSearch Dashboards.

#### Components
- **Elasticsearch / OpenSearch**: a distributed search engine that indexes every field of every document, enabling fast full-text search and aggregations.
- **Beats** (Filebeat, Metricbeat) or **Elastic Agent**: lightweight shippers on each host.
- **Logstash**: a pipeline that parses (grok, JSON), enriches (GeoIP) and routes events. Fluentd or Fluent Bit are frequent replacements.
- **Kibana / OpenSearch Dashboards**: search, visualisations and dashboards.

#### Core concepts
- Data lives in **indices** split into **shards** with **replicas** across nodes.
- **Mappings** define field types; let dynamic mapping run wild and you get mapping explosions.
- **Index Lifecycle Management** (ILM, or ISM in OpenSearch) rolls over indices and moves them hot to warm to cold to delete.
- Queries use **KQL** or the Lucene syntax in Kibana, and the Query DSL via the API.

#### Trade-offs vs Loki
Full-text indexing gives very fast, flexible search and analytics, but costs more CPU, memory and disk, and clusters need real care (shard sizing, heap, upgrades). Managed offerings (Elastic Cloud, Amazon OpenSearch Service) remove much of that work.

**Good enough to move on:** you can run a small Elasticsearch or OpenSearch cluster with Filebeat shipping container logs, set an ILM policy that deletes data after 14 days, and build a Kibana view of errors by service.

Key concepts: Elasticsearch vs OpenSearch, Beats and Elastic Agent, Logstash pipelines and grok, Indices, shards and replicas, Mappings, Index lifecycle management, Kibana and KQL.

Mini project: Run Elasticsearch and Kibana with Docker Compose, ship an app's JSON logs with Filebeat, add an ILM policy, and build a dashboard of error counts and top error messages.

Self-check: What problem does index lifecycle management solve, and what happens to a cluster that never deletes old indices?

Resources:
- [Elastic documentation](https://www.elastic.co/docs) (Elastic)
- [OpenSearch documentation](https://opensearch.org/docs/latest/) (OpenSearch Project)

### Distributed Tracing with OpenTelemetry

core · intermediate · about 7 h · https://www.internhack.in/roadmaps/tracks/devops/tracing-opentelemetry

Instrument services with the vendor-neutral OpenTelemetry standard and follow requests across services in Jaeger or Tempo.

In a system of many services, one slow request might touch ten of them. **Distributed tracing** records the journey so you can see which hop was slow or failed.

#### Concepts
- A **trace** is one request end to end; it is a tree of **spans**, each with a name, start time, duration, status and **attributes**.
- **Context propagation** passes the trace ID between services, usually in the W3C `traceparent` HTTP header or message metadata.
- **Sampling** controls cost: **head sampling** decides at the start (keep 10%); **tail sampling** decides after the trace completes (keep all errors and slow traces).

#### OpenTelemetry (OTel)
OpenTelemetry is the CNCF standard for generating telemetry: APIs and SDKs for every major language, **auto-instrumentation** for common frameworks and libraries, semantic conventions for attribute names, and the **OTLP** protocol.

The **OpenTelemetry Collector** receives, processes (batching, filtering, redaction, tail sampling) and exports telemetry to any backend. Run it as an agent per node and/or a gateway deployment. Because instrumentation is vendor neutral, you can switch backends without touching application code.

#### Backends
**Jaeger** and **Grafana Tempo** are popular open-source trace stores; commercial APM tools accept OTLP too. Link traces to logs (trace ID in log lines) and to metrics (exemplars) for fast pivots.

#### What to look for in a trace
Long gaps between spans (queueing), sequential calls that could be parallel, N+1 database queries, retries, and the first span that set an error status.

**Good enough to move on:** you can auto-instrument two services that call each other, send spans through a Collector to Jaeger or Tempo, configure tail sampling that keeps errors, and find the slow span in a trace.

Key concepts: Traces, spans and attributes, Context propagation and traceparent, OpenTelemetry SDKs and auto-instrumentation, OpenTelemetry Collector pipelines, Head vs tail sampling, Jaeger and Grafana Tempo, Linking traces, logs and metrics.

Mini project: Build two small services where one calls the other and a database, auto-instrument both with OpenTelemetry, route telemetry through a Collector to Jaeger or Tempo, and inject an artificial delay you then locate from the trace view.

Self-check: A trace shows service A's span but service B's spans appear as a separate trace. What most likely broke?

Resources:
- [OpenTelemetry documentation](https://opentelemetry.io/docs/) (OpenTelemetry)
- [Jaeger documentation](https://www.jaegertracing.io/docs/) (Jaeger)
- [Grafana Tempo documentation](https://grafana.com/docs/tempo/latest/) (Grafana Labs)

### Alerting That Does Not Burn People Out

core · intermediate · about 4 h · https://www.internhack.in/roadmaps/tracks/devops/alerting

Design alerts that page only for user-facing, actionable problems, route them with Alertmanager, and pair each with a runbook.

Bad alerting is worse than none: people learn to ignore it. Good alerting wakes someone only when users are hurting or about to be, and tells them what to do.

#### Principles
- **Page on symptoms, not causes.** "Checkout error rate above 2% for 5 minutes" is a page. "CPU at 90%" usually is not, unless it predicts user impact.
- **Every page must be actionable.** If the responder can only watch, it should be a ticket or a dashboard.
- **Severity levels**: page (wake someone now), ticket (fix this week), info (no notification).
- Use a `for:` duration so brief blips do not fire.
- **Burn-rate alerts** on SLOs catch both fast outages and slow degradation with few false positives.

#### Alertmanager
Prometheus evaluates rules; **Alertmanager** handles what happens next:
- **Routing** by labels (team, severity) to receivers: PagerDuty, Opsgenie, Slack, email.
- **Grouping** many related alerts into one notification.
- **Inhibition**: suppress downstream alerts when a root alert (such as a cluster down) is firing.
- **Silences** for planned maintenance.
Grafana Alerting and cloud-native alarm services cover the same ideas.

#### Runbooks
Each alert carries a link to a **runbook**: what the alert means, how to confirm impact, the first diagnostic commands, known fixes and who to escalate to. Review noisy alerts regularly and delete ones nobody acts on.

**Good enough to move on:** you can write a symptom-based alert with a sensible duration and severity, route it by team in Alertmanager with grouping and inhibition, and write a runbook a new teammate could follow at 3 a.m.

Key concepts: Symptom vs cause alerts, Actionability and severity levels, Alert rules and for durations, Alertmanager routing and grouping, Inhibition and silences, Runbooks, PagerDuty and Opsgenie integration.

Mini project: Write three alerts for your demo app (high error rate, high latency, target down), route critical ones to a paging receiver and warnings to Slack, add an inhibition rule, and write a runbook for each.

Self-check: Your team gets 40 pages a week and most resolve on their own. What would you change first?

Resources:
- [Alertmanager](https://prometheus.io/docs/alerting/latest/alertmanager/) (Prometheus)
- [Practical Alerting (SRE Book)](https://sre.google/sre-book/practical-alerting/) (Google SRE)

### SLIs, SLOs and Error Budgets

core · intermediate · about 4 h · https://www.internhack.in/roadmaps/tracks/devops/slo-error-budgets

Define reliability in terms users care about, set explicit targets, and use the remaining error budget to balance speed and stability.

"Make it reliable" is not a target. **Service level objectives** turn reliability into a number that product and engineering agree on.

#### Vocabulary
- **SLI (indicator)**: a ratio of good events to valid events, measured from the user's point of view. Examples: fraction of requests that return non-5xx in under 300 ms; fraction of jobs completed within 10 minutes.
- **SLO (objective)**: the target for an SLI over a window, such as 99.9% over 28 days.
- **SLA (agreement)**: a contract with customers and penalties, usually looser than the internal SLO.
- **Error budget**: 100% minus the SLO. At 99.9% over 30 days you may be "bad" for about 43 minutes.

#### Choosing good SLOs
- Start from critical **user journeys** (log in, search, pay), not from every component.
- Measure as close to the user as possible: load balancer logs or synthetic probes beat host metrics.
- 100% is the wrong target; each extra nine costs far more and users cannot tell.
- Begin with what you achieve today and tighten later.

#### Using the budget
- Budget left: ship faster, run experiments, do risky migrations.
- Budget exhausted: an agreed **error budget policy** kicks in, such as a feature freeze or reliability work taking priority.
- Alert on **burn rate**: how fast the budget is being consumed, with a fast window for outages and a slow one for gradual decay.

Tools such as **Sloth** or **Pyrra** generate Prometheus rules from SLO definitions, and most observability vendors support SLOs natively.

**Good enough to move on:** you can write an SLI as a good/valid ratio, calculate the error budget for a given SLO, and set up a multi-window burn-rate alert.

Key concepts: SLI, SLO and SLA, User journeys and good/valid ratios, Error budget math, Error budget policies, Burn-rate alerting, Sloth and Pyrra.

Mini project: Define availability and latency SLOs for your demo API, generate Prometheus recording and burn-rate alert rules (by hand or with Sloth), and build a Grafana panel showing budget remaining.

Self-check: Your service has a 99.95% monthly SLO and already had a 15-minute outage. Roughly how much budget remains, and what might your policy say?

Resources:
- [Service Level Objectives (SRE Book)](https://sre.google/sre-book/service-level-objectives/) (Google SRE)
- [Implementing SLOs (SRE Workbook)](https://sre.google/workbook/implementing-slos/) (Google SRE)
- [Alerting on SLOs (SRE Workbook)](https://sre.google/workbook/alerting-on-slos/) (Google SRE)

## Site Reliability Engineering Practice

Respond to incidents calmly, learn from them without blame, and plan capacity and recovery before you need it.

### Incident Response and On-Call

core · intermediate · about 4 h · https://www.internhack.in/roadmaps/tracks/devops/incident-response

How to run an incident from first alert to resolution with clear roles and communication, and how to build an on-call rotation people can sustain.

Incidents are inevitable; chaos during them is optional. A shared, rehearsed process lets people focus on fixing the problem.

#### Lifecycle of an incident
1. **Detect**: an alert, a customer report or a failed deploy.
2. **Declare** early. Opening an incident is cheap; waiting is expensive. Assign a **severity** from an agreed scale.
3. **Mitigate first**: restore service by rolling back, failing over, scaling up or disabling a feature flag. Root cause can wait.
4. **Communicate** on a regular cadence in one channel and on a status page.
5. **Resolve**, confirm with metrics, then hand off to the postmortem.

#### Roles
- **Incident commander**: coordinates, decides, delegates; does not debug.
- **Operations / subject-matter leads**: investigate and apply changes.
- **Communications lead**: updates stakeholders and customers.
- **Scribe**: keeps a timeline of observations and actions.
Small incidents may have one person wearing several hats, but the roles still exist.

#### Sustainable on-call
- Rotations of at least six to eight people, with primary and secondary.
- Clear **escalation** paths and handoff notes at shift change.
- Target a low number of pages per shift; track it and fix noisy sources.
- Compensate on-call and protect recovery time after rough nights.
- Keep runbooks, dashboards and access ready before the shift, not during the incident.

**Good enough to move on:** you can run a mock incident as commander with a timeline and status updates, explain why mitigation comes before root cause, and describe what a healthy rotation looks like.

Key concepts: Severity levels and declaring, Mitigate before root cause, Incident commander and roles, Status pages and stakeholder updates, On-call rotations and escalation, Handoffs and toil tracking, Incident tooling: PagerDuty, incident.io.

Mini project: Run a tabletop exercise with friends or classmates: break your demo app on purpose, play incident commander, keep a timestamped timeline and post three status updates until it is mitigated.

Self-check: Thirty minutes into an outage, the team has a likely root cause but a fix will take an hour, while a rollback takes five minutes. What do you do, and why?

Resources:
- [Managing Incidents (SRE Book)](https://sre.google/sre-book/managing-incidents/) (Google SRE)
- [Being On-Call (SRE Book)](https://sre.google/sre-book/being-on-call/) (Google SRE)
- [PagerDuty Incident Response guide](https://response.pagerduty.com/) (PagerDuty)

### Blameless Postmortems

core · intermediate · about 2 h · https://www.internhack.in/roadmaps/tracks/devops/postmortems

Turn incidents into lasting improvements by writing blameless reviews that explain contributing factors and track concrete actions.

A **postmortem** (or incident review) captures what happened, why the system allowed it, and what will change. Done well, it is the most valuable learning tool a team has.

#### Blameless does not mean accountability-free
People act on the information they had at the time. If one mistyped command could take down production, the problem is the system that allowed it. Blame makes people hide information; blamelessness makes the real contributing factors visible.

#### What a good document contains
- **Summary**: impact in user terms (who, how many, how long).
- **Timeline** with timestamps from detection to resolution.
- **Contributing factors**: usually several, technical and organisational. Techniques such as "five whys" help, but avoid stopping at a single root cause.
- **What went well** and **where we got lucky**.
- **Action items** that are specific, owned and tracked: add an alert, add a guard rail, fix a runbook, automate a step. Prioritise items that prevent a whole class of incident.

#### The meeting and after
Hold the review within a few days while memories are fresh. The facilitator keeps it about systems, not individuals. Publish the document widely, track actions to completion, and look for patterns across incidents each quarter.

#### When to write one
Any incident above an agreed severity, any SLO budget breach, data loss, security incidents and interesting near misses.

**Good enough to move on:** you can write a postmortem for a real or simulated incident with a clear timeline, several contributing factors and owned action items, and facilitate its review without assigning blame.

Key concepts: Blameless culture, Timelines and impact statements, Contributing factors over single root cause, Action items with owners, Review meetings and follow-up, Learning from near misses.

Mini project: Write a full postmortem for the tabletop incident from the previous topic, including a timeline, at least three contributing factors and five action items, then implement one of them.

Self-check: Why is 'engineer X ran the wrong command' a poor contributing factor, and how would you rewrite it?

Resources:
- [Postmortem Culture (SRE Book)](https://sre.google/sre-book/postmortem-culture/) (Google SRE)
- [Postmortem example (SRE Book)](https://sre.google/sre-book/example-postmortem/) (Google SRE)

### Capacity Planning, High Availability and Disaster Recovery

core · advanced · about 5 h · https://www.internhack.in/roadmaps/tracks/devops/reliability-capacity

Design for failure with redundancy, load testing, capacity forecasts and recovery plans measured in RPO and RTO.

Reliability is designed in, not added after an outage. This topic covers the planning side of SRE.

#### High availability patterns
- Remove **single points of failure**: at least two of everything across zones, with health-checked load balancing.
- **Graceful degradation**: serve cached or partial results when a dependency fails.
- **Timeouts, retries with backoff and jitter, circuit breakers** so one slow dependency does not cascade.
- **Bulkheads** and rate limits to isolate noisy tenants.

#### Capacity planning
- Know your **headroom**: how much traffic you can take before latency or errors climb.
- **Load test** with tools like k6, Locust or JMeter against realistic traffic shapes, and find the first bottleneck.
- Forecast from growth trends and planned launches; account for zone failure (N+1 capacity).
- Autoscaling helps but has limits: warm-up time, quotas, database connections.

#### Disaster recovery
- **RPO** (recovery point objective): how much data you can afford to lose.
- **RTO** (recovery time objective): how long you can be down.
- Strategies from cheapest to fastest: **backup and restore**, **pilot light**, **warm standby**, **multi-site active-active**.
- Keep backups in another region and account, and codify the rebuild in IaC.
- **Test the plan**: game days and restore drills. An untested DR plan is a hope, not a plan.

**Good enough to move on:** you can load test a service to find its limit, name its single points of failure, and write a DR plan with RPO, RTO and a strategy that matches them.

Key concepts: Removing single points of failure, Timeouts, retries and circuit breakers, Graceful degradation, Load testing with k6 or Locust, Capacity forecasting and headroom, RPO and RTO, DR strategies: backup to active-active, Game days and restore drills.

Mini project: Load test your demo service with k6 to find its breaking point, document the bottleneck and fix it, then write a DR plan with RPO and RTO and rehearse restoring it in a second region from backups.

Self-check: A business says it can lose at most 5 minutes of data and be down at most 1 hour. Which DR strategy fits, and what does it cost compared with backup and restore?

Resources:
- [Addressing Cascading Failures (SRE Book)](https://sre.google/sre-book/addressing-cascading-failures/) (Google SRE)
- [Grafana k6 documentation](https://grafana.com/docs/k6/latest/) (Grafana Labs)
- [AWS disaster recovery whitepaper](https://docs.aws.amazon.com/whitepapers/latest/disaster-recovery-workloads-on-aws/disaster-recovery-workloads-on-aws.html) (AWS)

### Chaos Engineering

optional · advanced · about 4 h · https://www.internhack.in/roadmaps/tracks/devops/chaos-engineering

Run controlled experiments that inject failure into systems to find weaknesses before real incidents do.

**Chaos engineering** is the discipline of experimenting on a system to build confidence that it can withstand turbulent conditions. It is not random breakage: it is the scientific method applied to resilience.

#### The experiment loop
1. Define **steady state** with metrics (request success rate, latency, orders per minute).
2. Form a **hypothesis**: "If one pod of the payment service dies, success rate stays above 99.9%."
3. **Inject** a realistic fault: kill an instance, add latency, drop packets, fill a disk, block a dependency, fail a zone.
4. **Observe** and compare against steady state.
5. **Learn and fix**, then repeat, ideally automated.

#### Keep it safe
- Start in staging, then move to production with a tiny **blast radius** (one pod, a small traffic slice).
- Have an abort switch and monitoring in place first.
- Tell the on-call team, and do not run experiments during incidents or peak events.

#### Tools
- **Chaos Mesh** and **LitmusChaos** for Kubernetes (pod kill, network chaos, stress).
- **AWS Fault Injection Service** and **Azure Chaos Studio** for cloud resources.
- **Toxiproxy** for injecting latency and failures between services in tests.
- **Game days**: scheduled team exercises that combine experiments with incident practice.

#### What you usually find
Missing timeouts, retries that amplify load, alerts that never fire, runbooks that are out of date, and hidden single points of failure.

**Good enough to move on:** you can write a hypothesis-driven experiment, run it with Chaos Mesh or a cloud fault injection service with a small blast radius, and turn a finding into a fix.

Key concepts: Steady state and hypotheses, Fault types: kill, latency, partition, Blast radius and abort conditions, Chaos Mesh and LitmusChaos, Cloud fault injection services, Game days.

Mini project: Install Chaos Mesh on your local cluster, hypothesise that your app tolerates one pod dying and 200 ms of added latency to its database, run both experiments while watching your SLO dashboard, and fix whatever breaks.

Self-check: What must be in place before you run a chaos experiment in production, and how do you limit the damage if the hypothesis is wrong?

Resources:
- [Principles of Chaos Engineering](https://principlesofchaos.org/) (principlesofchaos.org)
- [Chaos Mesh documentation](https://chaos-mesh.org/docs/) (Chaos Mesh)
- [LitmusChaos documentation](https://docs.litmuschaos.io/) (LitmusChaos)

## DevSecOps and Supply Chain Security

Build security into every stage of delivery: scan code and dependencies, secure the build chain, lock down identity, and enforce policy automatically.

### Shift-Left Security: SAST, SCA and DAST

core · intermediate · about 6 h · https://www.internhack.in/roadmaps/tracks/devops/security-scanning

Add automated security testing to pipelines, from source code and dependencies to IaC, containers and running applications.

**DevSecOps** means security is part of the everyday pipeline instead of a gate at the end. The practical core is a set of automated scanners, each looking at a different layer, plus a sane process for acting on what they find.

#### Know the common web risks
The **OWASP Top 10** (broken access control, injection, cryptographic failures, misconfiguration, vulnerable components and so on) is the shared vocabulary between developers and security teams. You do not need to be a pentester, but you should recognise each class.

#### Types of scanning
- **Secret scanning**: gitleaks, trufflehog, Git host push protection.
- **SAST** (static analysis of source): Semgrep, CodeQL, SonarQube. Finds injection patterns and unsafe APIs before code runs.
- **SCA** (software composition analysis): Dependabot, Renovate, Snyk, OSV-Scanner, `npm audit`. Finds known CVEs in dependencies and keeps them updated.
- **IaC scanning**: Checkov, Trivy, tfsec rules. Catches public buckets and open security groups at plan time.
- **Container image scanning**: Trivy, Grype, registry-native scanners.
- **DAST** (dynamic testing of a running app): OWASP ZAP against staging finds missing headers, auth issues and reflected input.

#### Making it work in practice
- Run fast scanners on every pull request and slower ones nightly.
- Fail builds only on high-confidence, high-severity findings at first; report the rest.
- Triage with **severity and exploitability**, and track exceptions with expiry dates.
- Automate dependency updates so patches arrive as small, reviewable pull requests.

**Good enough to move on:** you can add secret, SAST, SCA, IaC and image scanning to a pipeline with a sensible failure threshold, run a ZAP baseline scan against staging, and explain the difference between SAST and DAST.

Key concepts: OWASP Top 10, Secret scanning, SAST with Semgrep or CodeQL, SCA and automated dependency updates, IaC scanning with Checkov or Trivy, Container image scanning, DAST with OWASP ZAP, Triage, thresholds and exceptions.

Mini project: Add gitleaks, Semgrep, Dependabot or Renovate, Checkov and Trivy to a repository's pipeline, fail only on critical findings, and run a nightly OWASP ZAP baseline scan against a staging deployment.

Self-check: Which scanner type would catch a SQL injection in your code, which would catch a vulnerable version of a logging library, and which would catch a missing security header?

Resources:
- [OWASP Top Ten](https://owasp.org/www-project-top-ten/) (OWASP)
- [Semgrep documentation](https://semgrep.dev/docs/) (Semgrep)
- [Trivy documentation](https://trivy.dev/latest/docs/) (Aqua Security)
- [ZAP documentation](https://www.zaproxy.org/docs/) (ZAP)

### Software Supply Chain Security

core · advanced · about 5 h · https://www.internhack.in/roadmaps/tracks/devops/supply-chain-security

Protect the path from source to production with SBOMs, signed artifacts, provenance attestations and hardened build systems.

Attackers increasingly target the **build pipeline** rather than the application: compromised dependencies, poisoned CI actions, stolen publishing tokens, tampered images. Supply chain security makes every artifact traceable and verifiable.

#### Know what you ship: SBOMs
A **software bill of materials** lists every component and version inside an artifact, in **SPDX** or **CycloneDX** format. Generate one per build (Syft, Trivy, BuildKit attestations), store it with the artifact, and scan it when new CVEs are announced.

#### Prove where it came from: signing and provenance
- **Sigstore Cosign** signs container images and other artifacts. **Keyless signing** uses the CI system's OIDC identity, so there are no long-lived keys to leak.
- **Provenance attestations** record which repo, commit and workflow built an artifact.
- **SLSA** (Supply-chain Levels for Software Artifacts) defines levels of build integrity, from "provenance exists" up to hardened, isolated builders.

#### Enforce at deploy time
Admission controllers such as Kyverno, the Sigstore policy controller or cloud equivalents reject images that are unsigned, unscanned or built outside your pipeline.

#### Harden the pipeline itself
- Pin dependencies with lockfiles and CI actions to commit SHAs.
- Use proxy registries so builds do not pull directly from the public internet.
- Give CI jobs minimal permissions and short-lived tokens; protect release branches and tags.
- Require reviews for pipeline changes, since the pipeline is production.
- Beware typosquatting and dependency confusion between public and private package names.

**Good enough to move on:** you can produce an SBOM and a keyless Cosign signature for every image your pipeline builds, verify both, and block unsigned images from a cluster.

Key concepts: Supply chain attack examples, SBOMs: SPDX and CycloneDX, Cosign and keyless signing, Provenance and SLSA levels, Admission-time verification, Pinning, lockfiles and proxy registries, Dependency confusion and typosquatting.

Mini project: Extend your CI pipeline to generate an SBOM with Syft, sign the image and attach the SBOM with keyless Cosign, and configure a Kyverno policy so the cluster only runs images signed by your workflow.

Self-check: What does keyless signing use instead of a private key, and why does that reduce risk?

Resources:
- [SLSA specification](https://slsa.dev/) (OpenSSF)
- [Sigstore documentation](https://docs.sigstore.dev/) (Sigstore)
- [CycloneDX](https://cyclonedx.org/) (OWASP)

### Identity, Access and Least Privilege

core · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/devops/iam-least-privilege

Design who and what can access your systems: SSO for humans, workload identity for machines, scoped roles and auditable break-glass access.

Most serious cloud incidents come down to identity: a leaked key with admin rights, a role anyone could assume, a forgotten user. Getting IAM right is one of the highest-value things a DevOps engineer does.

#### Principles
- **Least privilege**: grant only the actions and resources needed, then tighten further with conditions.
- **No long-lived credentials**: humans use **SSO** with MFA and get temporary sessions; workloads use **roles** and **workload identity** (IRSA or EKS Pod Identity, Azure workload identity, GKE Workload Identity); CI uses **OIDC federation**.
- **Separate environments** into different accounts, subscriptions or projects so a dev mistake cannot touch prod.
- **Audit everything**: CloudTrail, Azure Activity Log, Cloud Audit Logs, and Kubernetes audit logs.

#### Reading and writing policies
Understand the pieces of a policy: **principal**, **action**, **resource**, **condition**, and **effect** (allow or deny). Know how explicit denies, permission boundaries and organisation-level guardrails (Service Control Policies, Azure Policy, Organization Policy) combine. Use access analysers and last-used data to remove unused permissions.

#### Kubernetes RBAC
Roles and ClusterRoles, bound to users, groups and service accounts. Avoid `cluster-admin` for apps, disable automounting service account tokens where not needed, and map cloud IAM groups to cluster roles.

#### Break-glass and reviews
Keep an emergency admin path that is locked away, alarmed and reviewed after use. Run periodic **access reviews** and remove leavers promptly; just-in-time elevation tools grant admin for an hour instead of forever.

**Good enough to move on:** you can write a scoped policy for an app that reads one bucket and one secret, give a Kubernetes pod cloud access with workload identity, and find unused permissions with an access analyser.

Key concepts: Least privilege and conditions, SSO and MFA for humans, Roles and workload identity, OIDC federation for CI, Policy evaluation and guardrails, Kubernetes RBAC and service accounts, Audit logs, Break-glass and access reviews.

Mini project: Remove every static access key from one of your projects: SSO for your own access, OIDC for CI, and workload identity for the app's pods, each with a least-privilege policy, and verify with the audit log.

Self-check: A policy allows s3:* on all resources, and an organisation guardrail denies s3:DeleteBucket. Can the role delete a bucket? Why?

Resources:
- [AWS IAM user guide](https://docs.aws.amazon.com/IAM/latest/UserGuide/) (AWS)
- [Kubernetes RBAC authorization](https://kubernetes.io/docs/reference/access-authn-authz/rbac/) (kubernetes.io)
- [Security hardening with OpenID Connect](https://docs.github.com/en/actions/security-for-github-actions/security-hardening-your-deployments/about-security-hardening-with-openid-connect) (GitHub)

### Policy as Code and Compliance

optional · advanced · about 5 h · https://www.internhack.in/roadmaps/tracks/devops/policy-as-code

Encode security and compliance rules as code with OPA, Kyverno or cloud policy services, and enforce them in CI and at admission.

As organisations grow, rules like "no public buckets", "all images from our registry" or "every resource has an owner tag" cannot rely on reviewers remembering them. **Policy as code** writes those rules down and enforces them automatically.

#### Where policies run
- **In CI**: check Terraform plans, Kubernetes manifests and Dockerfiles before merge (Conftest, Checkov custom rules).
- **At admission**: Kubernetes validating and mutating webhooks reject or fix resources as they are created.
- **In the cloud control plane**: AWS Service Control Policies and Config rules, Azure Policy, GCP Organization Policy.
- **At runtime**: detection tools such as **Falco** alert on suspicious behaviour inside containers.

#### The main engines
- **Open Policy Agent (OPA)** with the **Rego** language is general purpose: Kubernetes (via **Gatekeeper**), Terraform, APIs and more.
- **Kyverno** is Kubernetes-native, writes policies as YAML, and can validate, mutate, generate resources and verify image signatures.
- Kubernetes **Pod Security Admission** enforces the baseline and restricted pod standards with no extra install.

#### Rolling policies out
Start in **audit** mode to see what would break, fix existing violations, then switch to **enforce**. Give clear error messages that tell developers how to comply, keep policies in Git with tests, and document exceptions.

#### Compliance
Frameworks such as SOC 2, ISO 27001, PCI DSS and CIS Benchmarks map to concrete controls. Policy as code plus audit logs turns an evidence-gathering scramble into a report you can generate.

**Good enough to move on:** you can write a Kyverno or Gatekeeper policy that requires resource limits and blocks privileged pods, run it in audit then enforce mode, and test Terraform plans against a Conftest rule in CI.

Key concepts: Policy enforcement points, OPA, Rego and Gatekeeper, Kyverno policies, Pod Security Admission, Conftest for IaC in CI, Audit vs enforce rollout, Runtime detection with Falco, CIS Benchmarks and compliance frameworks.

Mini project: Install Kyverno on a local cluster with three policies (no latest tag, required limits, no privileged pods) in audit mode, fix the violations it reports, switch to enforce, and add a Conftest check for public buckets to your Terraform pipeline.

Self-check: Why roll a new admission policy out in audit mode first, and what information do you need before switching it to enforce?

Resources:
- [Open Policy Agent documentation](https://www.openpolicyagent.org/docs/latest/) (OPA)
- [Kyverno documentation](https://kyverno.io/docs/) (Kyverno)
- [Pod Security Admission](https://kubernetes.io/docs/concepts/security/pod-security-admission/) (kubernetes.io)

## Running Databases in Production

Keep stateful systems safe: backups you have actually restored, replication and failover, and schema changes that never cause downtime.

### Database Backups and Restores

core · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/devops/database-backups

Choose backup methods, schedules and retention that meet your RPO, and prove them by restoring regularly.

Nobody wants backups; everybody wants restores. A backup you have never restored is an assumption. This topic makes sure your data can come back.

#### Backup types
- **Logical** dumps (`pg_dump`, `mysqldump`, `mongodump`): portable, table-level restores, slow on large databases.
- **Physical** backups (`pg_basebackup`, Percona XtraBackup, storage snapshots): fast full copies of data files.
- **Point-in-time recovery (PITR)**: a base backup plus continuous **WAL** or **binlog** archiving lets you restore to any second, which is how you recover from "someone ran DELETE without WHERE at 14:03".
- **Managed services** (RDS, Cloud SQL, Azure Database) automate snapshots and PITR within a retention window; you still own cross-region copies and restore testing.

#### A sound backup policy
- Match frequency and PITR to the **RPO** agreed with the business.
- Follow **3-2-1**: three copies, two media or services, one off-site. In cloud terms, another region and ideally another account.
- Encrypt backups and restrict who can delete them; use **immutable** or object-locked storage against ransomware and mistakes.
- Keep retention for compliance and cost, with lifecycle rules to cheaper tiers.

#### Restore drills
Automate a scheduled restore into a scratch environment, run sanity queries (row counts, latest timestamps), and record how long it took. That duration is your real **RTO**. Tools such as **pgBackRest**, **WAL-G** and **Velero** (for Kubernetes volumes) help automate both sides.

**Good enough to move on:** you can configure PITR for Postgres, restore to a specific timestamp into a new instance, and run a scheduled restore test that reports its duration.

Key concepts: Logical vs physical backups, Point-in-time recovery with WAL/binlog, Managed database snapshots, 3-2-1 rule and cross-region copies, Immutable and encrypted backups, Automated restore drills, pgBackRest, WAL-G and Velero.

Mini project: Run Postgres with WAL archiving to object storage, insert data, simulate an accidental delete, restore to the second before it into a new instance, and script the whole drill so it runs weekly.

Self-check: Nightly snapshots are taken at 02:00. A bad migration corrupts data at 16:00. How much data do you lose without PITR, and how does PITR change that?

Resources:
- [PostgreSQL: backup and restore](https://www.postgresql.org/docs/current/backup.html) (PostgreSQL)
- [Amazon RDS backups](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html) (AWS)
- [Velero documentation](https://velero.io/docs/) (Velero)

### Replication, Failover and Connection Management

core · advanced · about 6 h · https://www.internhack.in/roadmaps/tracks/devops/database-replication-ha

Keep databases available with replicas and automated failover, scale reads, and protect them from connection storms.

A single database server is a single point of failure and eventually a bottleneck. Replication addresses both, with trade-offs you must understand before an outage tests them.

#### Replication modes
- **Asynchronous**: the primary commits, replicas catch up. Fast, but a failover can lose the last few transactions. Watch **replication lag**.
- **Synchronous** or semi-synchronous: commits wait for at least one replica. No data loss on failover, higher write latency.
- **Logical replication** streams row changes, useful for upgrades, migrations between versions and feeding other systems (change data capture).

#### High availability
- A primary with replicas in other zones, plus a manager that detects failure and promotes a replica: **Patroni** for Postgres, **Orchestrator** or group replication for MySQL, or a managed **Multi-AZ** option.
- Clients must find the new primary: DNS endpoints, a virtual IP or a proxy.
- Guard against **split brain** (two primaries) with consensus-based leader election and fencing.
- Test failover regularly; measure how long writes are unavailable.

#### Read scaling
Send read-only queries to replicas, but remember lag: a user may not see their own write. Route read-after-write queries to the primary.

#### Connections
Databases handle a limited number of connections, and each app replica has its own pool. Use a pooler such as **PgBouncer**, **RDS Proxy** or **ProxySQL**, size pools deliberately, and set statement timeouts.

#### On Kubernetes
Operators such as **CloudNativePG**, Zalando Postgres Operator or Percona operators handle replication, failover and backups. Many teams still prefer managed databases for anything critical.

**Good enough to move on:** you can build a primary with a replica, fail over and measure the write gap, put a connection pooler in front, and explain when read replicas can return stale data.

Key concepts: Async vs sync replication, Replication lag, Automated failover: Patroni, Multi-AZ, Split brain and fencing, Read replicas and read-after-write, Connection pooling: PgBouncer, RDS Proxy, Logical replication and CDC, Database operators on Kubernetes.

Mini project: Deploy Postgres with CloudNativePG or Patroni (one primary, two replicas), put PgBouncer in front of it, run a write loop while killing the primary, and report how many seconds writes failed.

Self-check: Your app creates 20 connections per pod and scales to 50 pods, but the database allows 500 connections. What happens, and how do you fix it?

Resources:
- [PostgreSQL: high availability and replication](https://www.postgresql.org/docs/current/high-availability.html) (PostgreSQL)
- [CloudNativePG documentation](https://cloudnative-pg.io/documentation/current/) (CloudNativePG)
- [PgBouncer](https://www.pgbouncer.org/) (PgBouncer)

### Zero-Downtime Schema Migrations

core · intermediate · about 4 h · https://www.internhack.in/roadmaps/tracks/devops/schema-migrations

Change database schemas safely inside CI/CD with versioned migrations and the expand-and-contract pattern.

Application code can roll back in seconds; a dropped column cannot. Schema changes are where deploys most often cause outages, so they need their own discipline.

#### Versioned migrations
Store every schema change as an ordered, immutable migration file in the repository and apply it with a tool: **Flyway**, **Liquibase**, **Atlas**, or framework tools such as Prisma Migrate, Alembic, Rails or Django migrations. The tool records which migrations ran in a table, so every environment converges to the same schema.

#### Running them in pipelines
- Apply migrations as a separate step (a CI job, a Kubernetes Job, or an Argo CD pre-sync hook) before new app code rolls out.
- Only one runner at a time: tools take a lock, but make sure your deploy does not start several.
- Test migrations against a copy of production-sized data in staging to spot slow operations.

#### Expand and contract
During a rolling deploy, old and new app versions run together, so every schema must work with both:
1. **Expand**: add the new column or table, nullable or with a default. Deploy code that writes to both old and new.
2. **Migrate**: backfill existing rows in small batches.
3. Switch reads to the new structure.
4. **Contract**: once no running code uses the old column, drop it in a later release.

#### Dangerous operations
Adding an index without `CONCURRENTLY` (Postgres) can block writes; rewriting a large table can hold locks for minutes; renaming a column breaks old code instantly. Set a `lock_timeout` so a migration fails fast instead of queueing every query behind it. Tools such as gh-ost or pt-online-schema-change handle big MySQL changes online.

**Good enough to move on:** you can run migrations as a gated pipeline step, rename a column with zero downtime using expand and contract, and name three operations that lock tables.

Key concepts: Versioned migration files, Flyway, Liquibase and Atlas, Migrations as a pipeline step, Expand and contract, Batched backfills, Locking operations and lock_timeout, Online schema change tools.

Mini project: In a demo app, rename a heavily used column with zero downtime across three releases using expand and contract, running each migration as a Kubernetes Job before the rollout, while a load test confirms no errors.

Self-check: Why is renaming a column in a single migration unsafe during a rolling deployment, even if the new code uses the new name?

Resources:
- [Flyway documentation](https://documentation.red-gate.com/flyway) (Redgate)
- [Atlas documentation](https://atlasgo.io/docs) (Atlas)
- [Parallel change (expand and contract)](https://martinfowler.com/bliki/ParallelChange.html) (Martin Fowler)

## Platform Engineering and Cloud Cost

Package everything you have learned into self-service golden paths for developers, and keep the cloud bill under control.

### Platform Engineering and Internal Developer Platforms

optional · advanced · about 6 h · https://www.internhack.in/roadmaps/tracks/devops/platform-engineering

Treat infrastructure as a product: golden paths, self-service templates and developer portals that let teams ship without filing tickets.

As companies grow, every team reinventing pipelines, clusters and dashboards becomes slow and risky. **Platform engineering** builds an **internal developer platform (IDP)**: a curated, self-service layer over the tools in this roadmap.

#### Platform as a product
- The users are developers. Interview them, measure their pain (time to first deploy, lead time, onboarding time) and prioritise like a product team.
- Offer **golden paths**: opinionated, supported ways to do common things (create a service, add a database, get a preview environment), while still allowing escape hatches.
- Aim to reduce **cognitive load**, not to hide everything.

#### Building blocks
- **Service templates** that create a repository with code skeleton, Dockerfile, pipeline, Helm chart, dashboards and alerts already wired.
- A **developer portal** such as **Backstage** with a software catalogue (who owns what), docs, templates and scorecards.
- **Infrastructure self-service** through Terraform modules, **Crossplane** compositions or platform APIs so developers request "a Postgres database" rather than twenty resources.
- **Preview environments** per pull request.
- Guard rails baked in: policies, security scanning, cost tags and SLO defaults.

#### Measuring success
Adoption of golden paths, DORA metrics across teams, developer satisfaction surveys, and time from idea to first production deploy for a new service.

#### Pitfalls
Building a platform nobody asked for, forcing a single path with no exits, and a portal that is only a pretty front end over ticket queues.

**Good enough to move on:** you can design a golden path for a new service, build a Backstage software template or equivalent that scaffolds a repo with CI/CD and monitoring, and explain how you would measure whether the platform helps.

Key concepts: Platform as a product, Golden paths and escape hatches, Service templates and scaffolding, Backstage developer portal, Crossplane and platform APIs, Preview environments, Measuring developer experience.

Mini project: Create a Backstage software template (or a cookiecutter plus script) that scaffolds a new service repository with a Dockerfile, CI workflow, Helm chart, GitOps registration and a starter dashboard, and time how long it takes to go from zero to deployed.

Self-check: How is a golden path different from a mandatory standard, and why does the difference matter for adoption?

Resources:
- [Backstage documentation](https://backstage.io/docs/overview/what-is-backstage) (Backstage)
- [Crossplane documentation](https://docs.crossplane.io/) (Crossplane)
- [CNCF Platforms white paper](https://tag-app-delivery.cncf.io/whitepapers/platforms/) (CNCF)

### FinOps and Cloud Cost Optimisation

optional · intermediate · about 4 h · https://www.internhack.in/roadmaps/tracks/devops/finops

Make cloud spend visible, attributable and efficient through tagging, rightsizing, commitment discounts and cost-aware engineering.

Cloud bills grow quietly: idle instances, oversized databases, forgotten snapshots, chatty cross-zone traffic. **FinOps** is the practice of bringing financial accountability to variable cloud spend, shared between engineering, finance and product.

#### The FinOps loop
1. **Inform**: make costs visible and attributable. Enforce **tags or labels** (team, service, environment), split shared costs, and give teams their own dashboards and budgets with alerts.
2. **Optimise**: reduce waste and buy smarter.
3. **Operate**: bake cost into everyday decisions and review it regularly.

#### Common savings
- **Rightsizing**: most instances and pods request far more CPU and memory than they use. Use utilisation data and tools like the Kubernetes VPA recommender.
- **Schedule** non-production environments to shut down at night and weekends.
- **Commitments**: Savings Plans, Reserved Instances and committed-use discounts for steady baseline load.
- **Spot / preemptible** capacity for stateless, fault-tolerant work such as CI runners and batch jobs.
- **Storage hygiene**: delete unattached volumes and old snapshots, use lifecycle policies and cheaper tiers.
- **Network**: keep chatty services in one zone where acceptable, use private endpoints instead of NAT, and cache at the edge.
- **Architecture**: serverless for spiky workloads, ARM-based instances for better price-performance.

#### Kubernetes cost
Costs hide inside shared clusters. Tools such as **OpenCost** or Kubecost allocate node costs to namespaces and workloads based on requests; **Karpenter** or cluster autoscaler bin-packing and consolidation reduce idle nodes.

#### Unit economics
Track cost per customer, per request or per order, not only the total. A rising bill with a falling unit cost can be a healthy business.

**Good enough to move on:** you can build a cost report by team from tags, find and fix three sources of waste in an account, and estimate savings from a commitment purchase.

Key concepts: Inform, optimise, operate, Tagging and cost allocation, Budgets and anomaly alerts, Rightsizing, Savings Plans, reservations and spot, Storage and network waste, Kubernetes cost with OpenCost, Unit economics.

Mini project: Audit a cloud account (your own or a sandbox): enforce cost tags with a policy, build a cost-by-service report, set budget alerts, and write up three concrete savings with estimated monthly amounts.

Self-check: When is buying a one-year commitment for compute a bad idea, even if it offers a large discount?

Resources:
- [FinOps Framework](https://www.finops.org/framework/) (FinOps Foundation)
- [AWS Cost Management](https://docs.aws.amazon.com/cost-management/latest/userguide/) (AWS)
- [OpenCost](https://opencost.io/docs/) (OpenCost)

## Capstone: Ship and Run a Production-Grade Platform

Put every section together in one portfolio project that shows you can build, deploy, observe, secure and operate a real system.

### Capstone: End-to-End DevOps Platform

core · advanced · about 40 h · https://www.internhack.in/roadmaps/tracks/devops/capstone-platform

Build a small but production-shaped system from bare cloud account to monitored, secured, GitOps-deployed services, and document it like a real team would.

This capstone is the project you show in interviews. It proves you can connect the pieces, not just use them one at a time. Keep the application simple (an API, a worker and a database) so your effort goes into the platform.

#### Scope
1. **Infrastructure as code**: Terraform or equivalent creates the network, a managed Kubernetes cluster (or ECS), a managed database, a registry and DNS, with remote state and separate dev and prod.
2. **CI**: every pull request lints, tests, scans (secrets, SAST, dependencies, IaC, image) and builds an image tagged with the commit SHA, with an SBOM and signature.
3. **CD with GitOps**: Argo CD or Flux deploys from a config repository; promotion from dev to prod is a pull request; rollouts use a canary or blue-green strategy.
4. **Secrets**: nothing sensitive in Git in plain text; workload identity for cloud access; OIDC for CI.
5. **Observability**: metrics, logs and traces wired up, a RED dashboard, SLOs with burn-rate alerts routed to a notification channel, and runbooks.
6. **Reliability**: backups with a tested restore, a documented DR plan with RPO and RTO, and at least one chaos or failover experiment.
7. **Security guard rails**: least-privilege IAM, network policies, admission policies for signed images and resource limits.

#### Deliverables
- A repository (or two) with a clear README and an architecture diagram.
- A short **operations handbook**: how to deploy, roll back, rotate a secret, restore the database and respond to each alert.
- One written **postmortem** for an incident you triggered on purpose.
- A cost estimate and the teardown command, so the environment does not run up a bill.

#### Presenting it
Be ready to explain every trade-off: why this cloud, why this deployment strategy, why these SLOs, and what you would change with ten times the traffic.

**Good enough to finish:** a stranger can clone your repository, follow the README to create the environment, deploy a change through the pipeline, watch it on your dashboards, and tear everything down.

Key concepts: IaC for network, cluster and database, CI with tests, scans, SBOM and signing, GitOps deployment with progressive rollout, Secrets and workload identity, Dashboards, SLOs and alerts, Backups, DR plan and failover test, Security guard rails, Operations handbook and postmortem, Cost estimate and teardown.

Mini project: Build the full capstone described above, record a five-minute walkthrough video that deploys a change end to end and triggers a rollback, and publish the repository with its README, architecture diagram and handbook.

Self-check: Could a new teammate deploy, roll back and restore your system using only your documentation? Have someone try it and fix every place they got stuck.

Resources:
- [AWS Well-Architected Framework](https://docs.aws.amazon.com/wellarchitected/latest/framework/welcome.html) (AWS)
- [The Site Reliability Workbook](https://sre.google/workbook/table-of-contents/) (Google SRE)
- [CNCF Cloud Native Landscape](https://landscape.cncf.io/) (CNCF)

## Related

- [Career roadmaps](https://www.internhack.in/roadmaps)
