Docsity

DevOps Engineer Fresher Interview Preparation, Exams of Job Interviewing Techniques and Skills

Toggle sidebar
bg1
DevOps Engineer Fresher Interview
Preparation Handbook
For DevOps Engineer, Junior DevOps Engineer and Cloud & DevOps Engineer interviews
1. Start Here
To get a fresher DevOps job you need strong Linux and networking basics, hands-on skill
with Git, CI/CD, Docker, Kubernetes and one cloud platform, and one or two end-to-end
projects you can explain and demo. You do not need to master every tool. You need to
understand how they fit together.
1.1 What is DevOps?
DevOps is a way of working where Development and Operations teams work together to
deliver software faster, more often and more reliably, using automation at every step.
Before DevOps: developers wrote code and "threw it over the wall" to the operations
team. Releases were slow, manual and often broke things.
With DevOps: code is automatically built, tested and deployed through a pipeline.
Problems are found early and fixed fast.
1.2 The DevOps lifecycle
flowchart LR
P[Plan] --> C[Code]
C --> B[Build]
B --> T[Test]
T --> R[Release]
R --> D[Deploy]
D --> O[Operate]
O --> M[Monitor]
M --> P
Stage
What happens
Common tools
Plan
Track tasks and features
Jira, GitHub Issues
Code
Write and version code
Git, GitHub, GitLab
Build
Compile and package the
app
Maven, npm, Docker
DevOps Engineer Fresher Interview Preparation Handbook
Page 1 of 42
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a

Partial preview of the text

Download DevOps Engineer Fresher Interview Preparation and more Exams Job Interviewing Techniques and Skills in PDF only on Docsity!

DevOps Engineer Fresher Interview

Preparation Handbook

For DevOps Engineer, Junior DevOps Engineer and Cloud & DevOps Engineer interviews

1. Start Here

To get a fresher DevOps job you need strong Linux and networking basics, hands-on skill

with Git, CI/CD, Docker, Kubernetes and one cloud platform, and one or two end-to-end

projects you can explain and demo. You do not need to master every tool. You need to

understand how they fit together.

1.1 What is DevOps?

DevOps is a way of working where Dev elopment and Op eration s teams work together to

deliver software faster, more often and more reliably , using automation at every step.

Before DevOps: developers wrote code and "threw it over the wall" to the operations

team. Releases were slow, manual and often broke things.

With DevOps: code is automatically built, tested and deployed through a pipeline.

Problems are found early and fixed fast.

1.2 The DevOps lifecycle

flowchart LR P[Plan] --> C[Code] C --> B[Build] B --> T[Test] T --> R[Release] R --> D[Deploy] D --> O[Operate] O --> M[Monitor] M --> P

Stage What happens Common tools

Plan Track tasks and features Jira, GitHub Issues

Code Write and version code Git, GitHub, GitLab

Build Compile and package the app

Maven, npm, Docker

1.3 What does a fresher DevOps engineer actually do?

Writes and fixes CI/CD pipelines

Builds Docker images and writes Dockerfiles

Deploys apps to Kubernetes or cloud servers

Creates and manages cloud resources (EC2, S3, VPC) using Terraform or the console

Writes Bash or Python scripts to automate daily tasks

Checks logs and dashboards when something breaks, and helps fix it

Manages access, secrets and basic security settings

Supports developers when builds or deployments fail

Stage What happens Common tools

Test Run automated tests JUnit, pytest, Selenium, SonarQube

Release / Deploy

Ship to servers or clusters Jenkins, GitHub Actions, Argo CD, Kubernetes

Operate Manage infrastructure AWS, Terraform, Ansible

Monitor Watch health, logs and alerts

Prometheus, Grafana, ELK, CloudWatch

1.6 How to use this handbook

1. Read Sections 1โ€“2 and follow the 8-week roadmap.

2. Study Sections 3โ€“9 with a terminal open โ€” type every command yourself.

3. Practise the tasks and scenarios in Section 10 until you can talk through them.

4. Use Sections 11โ€“12 in the final weeks for your project, resume, HR answers and mock

interviews.

  1. What to Learn and 8-Week Roadmap

Learn DevOps in layers. Each tool depends on the one before it. Skipping Linux and

jumping straight to Kubernetes is the most common fresher mistake.

flowchart TD A[Linux + Networking] --> B[Git + Scripting] B --> C[CI/CD] C --> D[Docker] D --> E[Kubernetes] E --> F[Cloud: AWS] F --> G[IaC: Terraform + Ansible] G --> H[Monitoring & Logging] H --> I[End-to-end project]

2.1 Skills checklist

Tick an item only when you can explain it and do it hands-on.

Must-know (tested in almost every interview):

Round What happens Duration

Take-home (some companies)

Build a small pipeline or deploy an app 1โ€“3 days

Managerial Situations, on-call pressure, teamwork 20โ€“ min

HR Background, motivation, shifts, salary 15โ€“30 min

Linux: file system, permissions, users, processes, services, package managers, logs

Networking: IP, ports, DNS, HTTP/HTTPS, TCP vs UDP, load balancer, firewall

Git: clone, branch, commit, merge, rebase basics, pull request, resolving conflicts

Bash scripting: variables, loops, conditions, simple automation scripts

Good-to-know (gives you an edge):

Bonus:

2.2 8-week roadmap

Assumes about 3 hours a day. Use a free-tier cloud account and a Linux VM or WSL on

your laptop.

CI/CD concepts and one tool: Jenkins or GitHub Actions

Docker: images, containers, Dockerfile, volumes, networks, Docker Compose

Kubernetes basics: pods, deployments, services, ConfigMaps, secrets, kubectl

AWS basics: EC2, S3, IAM, VPC, security groups, load balancer

Terraform for creating cloud infrastructure

Ansible for configuring servers

Monitoring: Prometheus and Grafana; logging with ELK / CloudWatch

Python scripting for automation

Nginx as a web server / reverse proxy

Helm charts for Kubernetes

GitOps with Argo CD

DevSecOps: image scanning (Trivy), code quality (SonarQube), secrets management

A cloud certification (e.g. AWS Cloud Practitioner or Solutions Architect Associate)

Azure or GCP basics

Week Focus What to do Done when you canโ€ฆ

1 Linux Daily use of terminal: files, permissions, users, processes, services, logs, SSH

Set up a web server (Nginx) on a Linux VM from scratch

2 Networking + Bash IP, DNS, ports, HTTP, curl, netstat/ss; write 5 Bash scripts

Explain what happens when you open a website; automate a backup

3 Git + CI/CD Git workflows, branching, PRs; build a pipeline in GitHub Actions or Jenkins

Push code and see it auto- build and test

4 Docker Images, Dockerfile, Compose, volumes, networks; containerise a web app

Run a 2-container app (app

  • database) with Compose

3.1 Must-know Linux commands

File permissions explained: rwxr-xr-- = owner can read/write/execute (7), group can

read/execute (5), others can only read (4) โ†’ 754. r = 4, w = 2, x = 1.

Task Commands

Navigate & files pwd , ls -la , cd , mkdir -p , cp -r , mv , rm -rf , touch , find / -name app.log

View files (^) cat , (^) less , (^) head -n 20 , (^) tail -f app.log , (^) wc - l

Search text grep -i "error" app.log , grep -r "TODO".

Permissions chmod 755 script.sh , chown user:group file , ls -l

Users (^) whoami , (^) useradd , (^) passwd , (^) sudo , (^) id

Processes ps aux , top / htop , kill -9 , pgrep nginx

Services (^) systemctl status nginx , (^) systemctl restart nginx , systemctl enable nginx

Disk & memory df -h , du -sh * , free -h

Packages (^) apt install nginx (Ubuntu), (^) yum install nginx (^) (RHEL/CentOS)

Logs (^) journalctl -u nginx , (^) /var/log/syslog , /var/log/messages

Networking ip a , ping , curl -I , wget , ss -tulnp / netstat -tulnp ,^ nslookup ,^ dig ,^ traceroute

Remote ssh user@host^ , scp file user@host:/path^ , rsync

Archives tar -czvf backup.tar.gz folder/ , tar -xzvf backup.tar.gz

3.2 Linux interview questions

3.3 Networking essentials

Question Short model answer

How do you check disk space? df -h for each file system; du -sh * to find which folders use the most space.

How do you find which process uses port 8080?

ss -tulnp | grep 8080 or^ lsof -i :.

How do you check running processes and kill one?

ps aux | grep appname to find the PID, then kill ; use kill -9 only if it doesn't stop.

What does chmod 755 mean? Owner: read, write, execute. Group and others: read and execute.

How do you watch a log file live? tail -f /var/log/app.log.

Soft link vs hard link? A soft link points to a file path (breaks if the file is deleted). A hard link points to the same data on disk (still works if the original name is deleted).

What is a cron job? A scheduled task. Example: 0 2 * * * /home/user/backup.sh runs a backup every day at 2 AM.

How do you check memory and CPU usage?

free -h for memory, top or htop for CPU and processes.

What is SSH and how do key-based logins work?

SSH is a secure remote login. You keep a private key; the server has your public key in ~/.ssh/authorized_keys.

What is the difference between a process and a thread?

A process is a running program with its own memory. Threads are smaller units inside a process that share its memory.

Concept Simple explanation

IP address The address of a machine on a network (e.g. 192.168.1.10)

3.4 Favourite question: "What happens when you type a URL in the browser?"

sequenceDiagram participant U as Browser participant D as DNS Server participant L as Load Balancer participant W as Web Server participant DB as Database U->>D: What is the IP of example.com? D-->>U: 93.184.216. U->>L: TCP handshake + TLS (HTTPS) U->>L: HTTP GET / L->>W: Forward request W->>DB: Fetch data DB-->>W: Data W-->>L: HTML response L-->>U: 200 OK + page

Say it in steps: browser checks cache โ†’ DNS lookup gives the IP โ†’ TCP connection (3-way

handshake) โ†’ TLS handshake for HTTPS โ†’ HTTP request sent โ†’ load balancer forwards to

a server โ†’ server processes and may query a database โ†’ response returned โ†’ browser

renders the page.

  1. Git and Version Control

Every CI/CD pipeline starts with Git. Interviewers expect you to use Git confidently from

the command line , not only through a GUI.

4.1 How Git works

flowchart LR W[WorkingDirectory] -- git add --> S[StagingArea] S -- git commit --> L[LocalRepository] L -- git push --> R[Remote RepoGitHub / GitLab] R -- git pull / fetch --> L

4.2 Must-know commands

git clone https://github.com/user/app.git # copy a repo git status # see changed files git add. # stage all changes git commit -m "Add health check endpoint" # save a snapshot git push origin main # upload to remote git pull origin main # fetch + merge latest

git branch feature/login # create a branch git checkout -b feature/login # create and switch git merge feature/login # merge into current branch git log --oneline --graph # view history git diff # see unstaged changes git stash / git stash pop # save work temporarily git revert # undo a commit safely git reset --hard # move back (dangerous on shared branches)

4.3 A typical team workflow

flowchart LR A[Create featurebranch] --> B[Commitchanges] B --> C[Push &open PR] C --> D[CI runsbuild + tests] D --> E[Codereview] E --> F[Merge tomain] F --> G[CD deploys]

4.4 Git interview questions

Question Short model answer

Git vs GitHub? Git is the version control tool. GitHub is a website that hosts Git repositories and adds PRs, issues and Actions.

git fetch vs git pull? Fetch downloads changes but doesn't merge. Pull = fetch + merge.

Merge vs rebase? Merge joins branches with a merge commit and keeps full history. Rebase replays your commits on top of another branch for a straight history. Don't rebase shared branches.

5.1 A typical CI/CD pipeline

flowchart LR A[Developerpushes code] --> B[Checkout] B --> C[Build] C --> D[Unit tests] D --> E[Code quality &security scan] E --> F[Build Dockerimage] F --> G[Push toregistry] G --> H[Deploy tostaging] H --> I{Approval} I --> J[Deploy toproduction]

If any stage fails, the pipeline stops and the team is notified (Slack / email).

5.2 GitHub Actions example

.github/workflows/ci-cd.yml

name: CI-CD Pipeline

on: push: branches: [ main ] pull_request: branches: [ main ]

jobs: build-test-push: runs-on: ubuntu-latest steps:

  • name: Checkout code uses: actions/checkout@v
  • name: Set up Python uses: actions/setup-python@v with: python-version: "3.12"
  • name: Install dependencies run: pip install -r requirements.txt
  • name: Run tests run: pytest
  • name: Log in to Docker Hub uses: docker/login-action@v

with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }}

  • name: Build and push image run: | docker build -t myuser/myapp:${{ github.sha }}. docker push myuser/myapp:${{ github.sha }}

Notice: passwords come from secrets , never written in the file, and the image is tagged

with the commit SHA so every build is traceable.

5.3 Jenkins declarative pipeline example

pipeline { agent any environment { IMAGE = "myuser/myapp:${BUILD_NUMBER}" } stages { stage('Checkout') { steps { git branch: 'main', url: 'https://github.com/myuser/myapp.git' } } stage('Build & Test') { steps { sh 'mvn clean package' } } stage('Docker Build') { steps { sh 'docker build -t $IMAGE .' } } stage('Push Image') { steps { withCredentials([usernamePassword(credentialsId: 'dockerhub', usernameVariable: 'USER', passwordVariable: 'PASS')]) { sh 'echo $PASS | docker login -u $USER --password-stdin' sh 'docker push $IMAGE' } } } stage('Deploy') { steps { sh 'kubectl set image deployment/myapp myapp=$IMAGE' } } }

flowchart LR subgraph BG["Blue-Green"] LB1[Load Balancer] --> B1[Blue v1 - live] LB1 -. switch .-> G1[Green v2 - new] end subgraph CN["Canary"] LB2[Load Balancer] -- 90% --> V1[v1] LB2 -- 10% --> V2[v2] end

  1. Docker

Docker packages an app with everything it needs (code, runtime, libraries) into a

container , so it runs the same on a laptop, a test server or production. It solves the classic

problem: "It works on my machine."

6.1 Key concepts

flowchart LR DF[Dockerfilerecipe] -- docker build --> IMG[Imagetemplate] IMG -- docker push --> REG[(RegistryDocker Hub / ECR)] REG -- docker pull --> IMG2[Image onserver] IMG2 -- docker run --> C[Containerrunning app]

Containers vs virtual machines:

Term Simple meaning

Image A read-only template with the app and its dependencies

Container A running instance of an image

Dockerfile Text file with instructions to build an image

Registry A place to store and share images (Docker Hub, AWS ECR)

Volume Storage that keeps data even when the container is deleted

Network Lets containers talk to each other

Docker Compose Runs multi-container apps from one YAML file

6.2 Sample Dockerfile (Python web app)

1. Small official base image

FROM python:3.12-slim

2. Working directory inside the container

WORKDIR /app

3. Install dependencies first (better layer caching)

COPY requirements.txt. RUN pip install --no-cache-dir -r requirements.txt

4. Copy the app code

COPY..

5. Run as a non-root user (security)

RUN useradd -m appuser USER appuser

6. Document the port and start the app

EXPOSE 5000 CMD ["python", "app.py"]

Best practices interviewers like to hear: small base images (slim/alpine), copy

dependency files first for caching, multi-stage builds for compiled apps, .dockerignore ,

non-root user, no secrets in the image, pin image versions instead of latest^.

Virtual machine Container

Includes Full guest OS Only the app and its libraries; shares host kernel

Size GBs MBs

Start time Minutes Seconds

Isolation Stronger Lighter, process-level

  1. Kubernetes Basics

Docker runs containers; Kubernetes (K8s) manages many containers across many

machines. It restarts failed containers, scales them up and down, balances traffic and

rolls out updates with no downtime.

7.1 Kubernetes architecture

flowchart TB subgraph CP["Control Plane"] API[API Server] ETCD[(etcd)] SCH[Scheduler]

Question Short model answer

Image vs container? An image is the template; a container is a running copy of it. One image can run many containers.

CMD vs ENTRYPOINT? CMD gives default arguments that can be overridden easily. ENTRYPOINT sets the main command that always runs.

COPY vs ADD? COPY just copies files. ADD can also extract tar files and download URLs. Prefer COPY.

What is a multi-stage build? Using one stage to build the app and a smaller final stage with only the output, which makes images much smaller.

How do you persist data? Use volumes ( -v db-data:/var/lib/mysql ) or bind mounts.

How do containers talk to each other? Through Docker networks; on a user-defined network or in Compose they use each other's service names.

How do you reduce image size? Slim/alpine base, multi-stage builds, fewer layers, .dockerignore^ , remove caches.

Container keeps exiting. How do you debug?

docker ps -a to see exit code,^ docker logs for the error, check CMD and env variables, run it with -it and a shell.

What does (^) -p 8080:5000 mean? Host port 8080 forwards to container port 5000.

CM[Controller Manager] end subgraph N1["Worker Node 1"] K1[kubelet] P1[Pods] KP1[kube-proxy] end subgraph N2["Worker Node 2"] K2[kubelet] P2[Pods] KP2[kube-proxy] end U[kubectl] --> API API --> ETCD API --> SCH API --> CM API --> K API --> K

7.2 Core objects

Component Job

API Server Front door of the cluster; every command goes through it

etcd Key-value store that holds the whole cluster state

Scheduler Decides which node a new pod runs on

Controller Manager Keeps the actual state equal to the desired state (e.g. 3 replicas)

kubelet Agent on each node that runs and watches pods

kube-proxy Handles networking rules so services can reach pods

Object Simple meaning

Pod Smallest unit; one or more containers sharing network and storage

Deployment Manages replicas of pods, rolling updates and rollbacks