SRE From Scratch
Complete learning journey and hands-on labs. 100% free resources with practical exercises.
Roadmap: 10 phases
Follow the phases in order. Each one builds on the previous. Time estimates are suggestions for someone studying part-time, not measurements.
Linux Foundation
Master core Linux concepts: file systems, permissions, processes, and shell scripting. This foundation underpins every SRE skill you'll build.
Networking & TCP/IP
Understand networking layers, protocols, and debugging tools. Learn DNS, HTTP/HTTPS, firewalls, and load balancing principles.
Docker & Containers
Build and deploy containerized applications. Learn Docker images, registries, networking, and best practices for production use.
Kubernetes Essentials
Deploy and manage containerized workloads at scale. Learn pods, services, deployments, and the fundamentals of cluster operations.
Infrastructure as Code (Terraform)
Automate infrastructure provisioning with Terraform. Learn state management, modules, and managing cloud resources as code.
Monitoring & Observability
Build visibility into system behavior. Master metrics, logs, traces, and alerting using Prometheus, Grafana, and ELK stack concepts.
Incident Management
Respond to and manage incidents effectively. Learn incident response, post-mortems, blameless culture, and communication during outages.
CI/CD Pipelines
Automate testing and deployment. Learn GitLab CI, GitHub Actions, Jenkins, and building reliable continuous integration pipelines.
Security Hardening
Secure infrastructure and applications. Learn container security, network policies, secrets management, and vulnerability scanning.
On-Call Readiness
Prepare for on-call responsibilities. Learn alerting strategies, runbooks, escalation procedures, and building systems that fail gracefully.
Your commitment
The phase estimates add up to about 45 hours of structured study. The suggested video courses alone run about 48 hours, so plan more time if you watch them in full. Master the fundamentals. Build practical skills. Own the platform.
Progress is saved in this browser only.
Free video courses
A curated order of free YouTube courses, about 48 hours in total. They are made by independent creators and are not affiliated with this site. Durations and titles were checked on 20 September 2026 and can change.
All courses are in English as far as could be checked: on 20 September 2026 the automatic caption language shown by YouTube was English for each video. This indicates the spoken language, it is not a guarantee. Do not just watch: build, break and fix things as you go.
Hands-on labs
Five labs, one per major tool. Use local environments or a free tier.
Lab 1: Linux Shell Mastery
BeginnerEstimated time: 2 hours
Set up a local Linux environment and practice essential commands.
Objectives
- Navigate filesystem with ls, cd, pwd
- Manage permissions with chmod, chown
- Write and execute shell scripts
- Use grep, sed, awk for text processing
Practice commands
find / -name "*.log" | grep -v "/proc" | head -20
tar -czf archive.tar.gz /path/to/data
for i in {1..10}; do echo "Iteration $i"; done
chmod 755 script.sh && ./script.shLab 2: Docker Container Build & Run
IntermediateEstimated time: 3 hours
Create a Dockerfile, build an image, and run a containerized application.
Objectives
- Write a multi-stage Dockerfile
- Push image to a registry (Docker Hub or local)
- Run containers with port binding and volumes
- Debug with docker logs and docker exec
Practice commands
docker build -t myapp:1.0 .
docker run -d -p 8080:3000 -v /data:/app/data myapp:1.0
docker inspect container_id
docker exec -it container_id /bin/bashLab 3: Kubernetes Pod Deployment
IntermediateEstimated time: 4 hours
Deploy and manage pods in a local Kubernetes cluster.
Objectives
- Create a local K8s cluster (minikube or kind)
- Write YAML manifests for Deployments and Services
- Use kubectl to apply and manage resources
- Monitor pod logs and resource usage
Practice commands
minikube start
kubectl apply -f deployment.yaml
kubectl get pods -o wide
kubectl logs pod_name -f
kubectl port-forward svc/myservice 8080:80Lab 4: Terraform Infrastructure as Code
IntermediateEstimated time: 3 hours
Provision cloud infrastructure using Terraform.
Objectives
- Set up Terraform working directory
- Write resource definitions (compute, networking, storage)
- Plan and apply changes safely
- Destroy resources cleanly
Practice commands
terraform init
terraform fmt -recursive
terraform plan -out=tfplan
terraform apply tfplan
terraform destroyLab 5: Prometheus Monitoring Setup
IntermediateEstimated time: 2.5 hours
Deploy Prometheus and create custom metrics dashboards.
Objectives
- Install and configure Prometheus
- Set up exporters (Node Exporter, etc.)
- Query metrics using PromQL
- Create Grafana dashboards
Sample PromQL queries
rate(http_requests_total[5m])
node_memory_MemFree_bytes / node_memory_MemTotal_bytes
up{job="prometheus"}
histogram_quantile(0.95, sum by (le) (rate(http_request_duration_seconds_bucket[5m])))Practical exercises
Open-ended tasks. There is no answer key: compare your result with a colleague or write up your reasoning.
Exercise 1: Build a Custom Alpine-Based Container Image
- Create a Dockerfile based on Alpine Linux
- Install essential tools: curl, wget, git, vim
- Add a non-root user with sudo privileges
- Set working directory and expose a port
- Build the image and test it with docker run
- Challenge: Create a docker-compose.yml to run 3 containers together
Exercise 2: Deploy a Multi-Tier App on Kubernetes
- Create separate deployments for frontend, backend, and database
- Use ConfigMaps for application config
- Create Services to expose backend and frontend
- Set up port-forwarding to test the full stack
- Scale the frontend deployment to 3 replicas
- Challenge: Implement health checks (liveness and readiness probes)
Exercise 3: Terraform Multi-Environment Setup
- Create separate Terraform modules for dev and prod environments
- Use tfvars files to manage environment-specific variables
- Provision compute instances, networking, and storage
- Output instance IPs and connection details
- Validate the plan before applying
- Challenge: Implement remote state with S3 backend
Exercise 4: Monitoring and Alerting Pipeline
- Deploy Prometheus with custom scrape configs
- Set up alerting rules for CPU, memory, and disk usage
- Configure Alertmanager to route alerts
- Create Grafana dashboards for key metrics
- Test alerting by triggering a threshold breach
- Challenge: Integrate alerts with a notification service (email, Slack)
Exercise 5: CI/CD Pipeline with GitLab CI
- Create a .gitlab-ci.yml in your repository
- Define stages: test, build, deploy
- Run unit tests on every push
- Build and push Docker image to registry
- Deploy to a staging environment
- Challenge: Add approval gates for production deployment
Training QCM: test your knowledge
Five questions, shuffled on every load. Click an answer to see the explanation.
Want more? The Quiz Hub has 100 questions in 10 topics, including Linux, Kubernetes, observability and SRE practices.
benmabrouk.fr: free DevOps and SRE learning resources, written from production experience.