This is a very good foundation interview set. A DevOps engineer with 5–7 years of experience should be able to explain all of these clearly.
Infrastructure Fundamentals
What is Hardware?
Answer:
Hardware is the physical component of a computer system.
Examples:
- CPU
- RAM
- SSD
- Network Card (NIC)
- Motherboard
- Hard Drive
Without hardware, software cannot run.
What is Software?
Answer:
Software is a collection of programs and instructions that run on hardware.
Examples:
- Linux
- Windows
- Docker
- Kubernetes
- Jenkins
- Nginx
Hardware = Physical machine
Software = Instructions running on machine
CPU
What is CPU?
Answer:
CPU (Central Processing Unit) is the brain of the computer.
Responsibilities:
- Execute instructions
- Process calculations
- Run applications
- Manage processes
Example:
When you run:
kubectl get pods
CPU processes that command.
How do you check CPU usage?
top
or
htop
or
mpstat
RAM
What is RAM?
Answer:
RAM is temporary memory used by running applications.
Examples:
- Kubernetes Pods
- Docker Containers
- Nginx
- Java Applications
When server reboots, RAM is cleared.
How do you check memory usage?
free -h
Example:
free -h
Output:
Mem: 16Gi 10Gi 2Gi 4Gi
How to check memory consumers?
top
or
ps aux --sort=-%mem
SSD
What is SSD?
Answer:
SSD (Solid State Drive) is permanent storage.
Used for:
- Operating System
- Logs
- Databases
- Files
Advantages:
- Faster than HDD
- No moving parts
IP Address
What is IP Address?
Answer:
IP Address uniquely identifies a device on a network.
Example:
192.168.1.10
Similar to a home address.
Without IP, devices cannot communicate.
Difference between Public and Private IP
Private:
10.0.0.0/8
172.16.0.0/12
192.168.0.0/16
Public:
Accessible from internet.
Example:
54.12.34.56
Port
What is Port?
Answer:
Port identifies a service running on an IP address.
Example:
192.168.1.10:80
IP = House
Port = Apartment Number
Common Ports
| Port | Service |
|---|---|
| 22 | SSH |
| 80 | HTTP |
| 443 | HTTPS |
| 53 | DNS |
| 3306 | MySQL |
| 5432 | PostgreSQL |
| 6379 | Redis |
Protocol
What is Protocol?
Answer:
Protocol is a set of communication rules.
Examples:
- HTTP
- HTTPS
- TCP
- UDP
- SSH
Difference between TCP and UDP
TCP:
- Reliable
- Ordered
- Connection oriented
Examples:
- HTTP
- HTTPS
- SSH
UDP:
- Fast
- No delivery guarantee
Examples:
- DNS
- Video Streaming
OSI Model
Explain OSI Model
| Layer | Name |
|---|---|
| 7 | Application |
| 6 | Presentation |
| 5 | Session |
| 4 | Transport |
| 3 | Network |
| 2 | Data Link |
| 1 | Physical |
Layer 7
Application Layer
Examples:
- HTTP
- HTTPS
- FTP
Layer 4
Transport
Protocols:
- TCP
- UDP
Layer 3
Network
Responsible for:
- Routing
- IP Addressing
Devices:
- Router
Layer 2
Data Link
Responsible for:
- MAC Addresses
Devices:
- Switch
Layer 1
Physical
Examples:
- Cables
- Fiber
- Ethernet
EC2
What is EC2?
Answer:
Amazon EC2 is a virtual server in AWS.
Used to run:
- Linux
- Applications
- Databases
- Docker
Example:
Launch Ubuntu server.
Install Nginx.
Access via browser.
ASG
What is Auto Scaling Group?
Answer:
ASG automatically adds or removes EC2 instances.
Benefits:
- High Availability
- Scalability
- Self Healing
Example:
Traffic increases.
ASG:
2 EC2 → 4 EC2 → 8 EC2
ALB
What is Application Load Balancer?
Answer:
ALB distributes HTTP/HTTPS traffic across multiple targets.
Works at:
OSI Layer 7
Supports:
- Host-based routing
- Path-based routing
Example:
/api/users → User Service
/api/orders → Order Service
NLB
What is Network Load Balancer?
Answer:
NLB works at:
Layer 4
Handles:
- TCP
- UDP
Very fast.
Millions of connections.
Target Group
What is Target Group?
Answer:
Target Group contains backend servers.
Example:
ALB
↓
Target Group
↓
EC2 Instances
Health checks are performed against targets.
Security Group
What is Security Group?
Answer:
Virtual firewall for AWS resources.
Controls:
- Inbound Traffic
- Outbound Traffic
Example:
Allow:
22 SSH
80 HTTP
443 HTTPS
EBS
What is EBS?
Answer:
Elastic Block Store.
Persistent disk attached to EC2.
Similar to:
SSD attached to server
Use cases:
- Databases
- Application storage
EFS
What is EFS?
Answer:
Elastic File System.
Shared storage.
Multiple EC2 instances can mount same filesystem.
Example:
EC2-1
EC2-2
EC2-3
↓
EFS
S3
What is S3?
Answer:
Object Storage Service.
Stores:
- Images
- Videos
- Backups
- Logs
Characteristics:
- Durable
- Highly Available
- Unlimited Scale
Cookies
What are Cookies?
Answer:
Small files stored in browser.
Used for:
- Login Sessions
- User Preferences
- Tracking
Example:
User logs in.
Cookie stores session identifier.
Persistent Volume (PV)
What is Persistent Volume?
Answer:
Persistent storage in Kubernetes.
Pod can restart without losing data.
Example:
Pod
↓
PVC
↓
PV
↓
EBS
Linux Commands
Check Disk Usage
df -h
Shows:
Filesystem
Size
Used
Available
Check Filesystem Size
lsblk
Check Memory
free -h
Check CPU
top
Check Processes
ps aux
Kill Process
kill -9 PID
Search File
find / -name nginx.conf
Check Port
ss -tulpn
or
netstat -tulpn
Current Directory
pwd
List Files
ls -la
Copy
cp file1 file2
Move
mv old new
Delete
rm -rf folder
Change Permissions
chmod 755 file
Change Ownership
chown ubuntu:ubuntu file
Systemd
What is systemd?
Answer:
systemd is Linux service manager.
Manages:
- Services
- Boot process
- Logs
Examples:
- nginx
- docker
- kubelet
systemctl
Start Service
sudo systemctl start nginx
Stop Service
sudo systemctl stop nginx
Restart Service
sudo systemctl restart nginx
Service Status
systemctl status nginx
Enable On Boot
sudo systemctl enable nginx
journalctl
What is journalctl?
Answer:
Reads systemd logs.
View Logs
journalctl
Service Logs
journalctl -u nginx
Real-Time Logs
journalctl -fu nginx
apt
What is apt?
Answer:
Ubuntu package manager.
Install package
sudo apt install nginx -y
Update repository
sudo apt update
Upgrade packages
sudo apt upgrade -y
sudo
What is sudo?
Answer:
Runs command as root.
Example:
sudo apt update
Network Troubleshooting
Check IP Address
ip a
Check Routing Table
ip route
Test Connectivity
ping 8.8.8.8
DNS Test
nslookup google.com
or
dig google.com
Trace Route
traceroute google.com
Check Open Ports
ss -tulpn
Test TCP Port
telnet hostname 80
or
nc -zv hostname 80
Real Interview Scenario
Question: Website is down. How do you troubleshoot?
Answer:
- Check process
ps aux | grep nginx
- Check service
systemctl status nginx
- Check logs
journalctl -u nginx
- Check port
ss -tulpn | grep 80
- Check disk
df -h
- Check memory
free -h
- Check CPU
top
- Check connectivity
ping
curl
nc
Check firewall/security group
Check DNS
nslookup
dig
Check load balancer health checks
Verify backend application is responding
This troubleshooting flow is exactly the type of answer expected from a mid-to-senior DevOps/SRE engineer during interviews.
Top comments (0)