
Scenario:
Your application generates large logs in /var/log/myapp/ and there's no log rotation setup.
Task:
Write a shell script that compresses logs older than 7 days and deletes logs older than 30 days. Also, run it daily via cron.
Bulk User Creation from CSV
Scenario:
You’ve received a CSV file with a list of usernames and passwords to create users on a Linux system.
Task:
Write a shell script to read the CSV and:
Create each user with the specified password.
Force password change on first login.
INPUT:
services=("nginx" "sshd" "docker")
OUTPUT:
-----------------------------------
Service Health Check Report
-----------------------------------
nginx is ✅ RUNNING
-----------------------------------
sshd is ✅ RUNNING
-----------------------------------
docker is ❌ STOPPED
Attempting to restart docker...
docker has been ✅ restarted successfully.
-----------------------------------
Command:
last -F | grep "$(date '+%b %e')" | awk '{print $1}' | sort | uniq
Control Plane (Master) Components
kube-apiserver
The central API endpoint (https://<master>:6443)
Authenticates, validates, and processes all REST requests (e.g., kubectl apply)
Stores state changes in etcd
etcd
A strongly consistent key–value store
Holds the entire cluster state and configuration data
kube-scheduler
Watches for newly created Pods with no assigned node
Selects an appropriate node based on resource requirements, affinity/anti-affinity, taints/tolerations, and other policies
kube-controller-manager
Runs control loops (“controllers”) that reconcile desired vs. actual cluster state, e.g.:
Node Controller: detects unhealthy nodes
Replication Controller: ensures the right number of Pod replicas
Endpoint Controller: populates Service→Pod mappings
Job Controller, DaemonSet Controller, etc.
Ultimate DevOps and Cloud Interview Guide that covers topic by topic scenario based Interview questions with detailed notes through a GitHub Repository. All the Interview questions are collected from candidates who are actively attending Interviews for DevOps and Cloud roles.
This course covers following topics:
- Git
- Linux
- Networking
- CI/CD
- Terraform
- Docker
- Kubernetes
- Observability
- AWS
- Azure
- Project related and SDLC
GitHub repository associated with the notes has all the questions in the exact order of the course. Each question has a MD file in the repository which covers the detailed explanation of the answer for your quick reference. Questions added to this course in the future will also be updated in the GitHub repository in the same way.
The main goal of the course is to make every DevOps and Cloud aspirants job ready. If you are planning to attend Interviews or failing in clearing the Interviews currently then this course is absolutely for you. All the questions are organized to for the better experience of the user. You will find questions on various topics and sub-topics on DevOps.
Key Takeaways from the course:
- Interview Readiness
- Upskill with latest scenario based Interview Questions
- Approach to answer any scenario based Interview Question confidently.
Happy learning.