Posts

1. How do you check system performance? Use multiple tools depending on need: top htop uptime vmstat 1 iostat -x 1 free -m sar -u 1 5 ๐Ÿ‘‰ Real-time: CPU bottleneck → check top & vmstat 2. How do you find high CPU consuming process? top ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%cpu | head Kill process: kill -9 3. How do you check memory usage? free -m cat /proc/meminfo top 4. Difference between soft link & hard link? ln file1 hardlink ln -s file1 softlink Hard link → same inode Soft link → pointer (like shortcut) 5. How do you find large files? find / -type f -size +100M du -ah / | sort -rh | head -20 6. How do you monitor logs in real-time? tail -f /var/log/messages tail -f /var/log/syslog 7. What is inode? Check inode: ls -i df -i ๐Ÿ‘‰ Stores metadata of file 8. How do you manage disk space? df -h du -sh * Clean: rm -rf unwanted_files 9. How do you check open ports? netstat -tulnp ss -tulnp 10. How do you check running services? systemctl status nginx systemctl list-units --type=se...
Kubernestes inteview questions for experienced:
 ๐Ÿ”ฅ Kubernetes Interview Questions with Commands 1. How do you check all resources in a cluster? kubectl get all ๐Ÿ‘‰ Namespace specific: kubectl get all -n dev 2. How do you create a resource? kubectl apply -f deployment.yaml 3. How do you check pod details? kubectl describe pod pod-name 4. How do you check pod logs? kubectl logs pod-name ๐Ÿ‘‰ Multi-container pod: kubectl logs pod-name -c container-name 5. How do you exec into a pod? kubectl exec -it pod-name -- /bin/bash 6. How do you check nodes? kubectl get nodes kubectl describe node node-name 7. How do you scale a deployment? kubectl scale deployment app-name --replicas=5 8. How do you check deployment status? kubectl get deployments kubectl describe deployment app-name 9. How do you check rollout status? kubectl rollout status deployment app-name 10. How do you rollback deployment? kubectl rollout undo deployment app-name 11. How do you check services...

Kubernetses Interview Questions:

Kuberneste interview questions: 1).๐Ÿ”ฅ Kubernetes Critical Interview Q&A (with Commands) ⚙️ 1. Pod Crash / Debugging Q: Pod is crashing. How do you troubleshoot? kubectl get pods kubectl describe pod kubectl logs kubectl logs --previous kubectl exec -it -- /bin/sh kubectl get events --sort-by=.metadata.creationTimestamp ⚙️ 2. Pod Pending Issue Q: Pod stuck in Pending state kubectl describe pod kubectl get nodes kubectl describe node kubectl get pvc kubectl describe pvc ⚙️ 3. Desired Pods ≠ Running Pods Q: Desired = 5, Running = 3 kubectl get deployment kubectl describe deployment kubectl get rs kubectl get pods -o wide kubectl describe pod kubectl get nodes kubectl top nodes ๐ŸŒ 4. Service Not Reachable Q: Service is not accessible kubectl get svc kubectl describe svc kubectl get endpoints kubectl get pods -o wide kubectl exec -it -- curl kubectl exec -it -- nslookup ๐ŸŒ 5. Networking Issue Between Pods kubectl exec -it -- ping kubectl exec -it -- curl ...

Linux Interview Questions for experienced

Advanced Linux Interview Questions (with Practical Focus) ๐Ÿง  1. What happens when you type a command in Linux? Flow: Shell receives command Checks PATH variable Finds binary (/bin, /usr/bin) Forks process Executes via exec() ⚙️ 2. How do you check CPU, Memory, and Disk usage? top htop free -m vmstat iostat df -h du -sh * ๐Ÿ‘‰ Real-time: “If server is slow → first check top and iostat” ๐Ÿ” 3. How do you find which process is using high CPU? top ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%cpu | head Kill process: kill -9 ๐Ÿ“‚ 4. Difference between soft link and hard link? Feature Soft Link Hard Link Command ln -s ln Inode Different Same Works across FS Yes No If original deleted Broken Still works ๐Ÿ” 5. File permissions (very important) chmod 755 file chown user:group file ๐Ÿ‘‰ 755 = rwxr-xr-x ๐Ÿ”ฅ 6. What is inode? Stores metadata of file (size, owner, permissions) Does NOT store filename Check: ls -i df -i ๐Ÿงช 7. What will you do if disk is full? df -h du -sh /* find / -size +100M ๐Ÿ‘‰ Clear logs: tru...
Dokcer Interview Questions: ============================= ๐Ÿ”ฅ Advanced Practical Docker Interview Questions ๐Ÿงฑ 1. Docker Architecture & Internals Q: Explain how Docker works internally when you run docker run nginx. ๐Ÿ‘‰ Expected: Docker CLI → Docker Daemon → containerd → runc Image pull from registry Creation of container using namespaces & cgroups ๐Ÿณ 2. Write a Dockerfile (Real Scenario) Q: Create a Dockerfile for a Node.js app. FROM node:18-alpine WORKDIR /app COPY package*.json ./ RUN npm install COPY . . EXPOSE 3000 CMD ["npm", "start"] ๐Ÿ‘‰ Follow-up: How to reduce image size? Why use alpine? ๐Ÿ“ฆ 3. Multi-Stage Build (Very Important) Q: Optimize this Dockerfile for production. # Build stage FROM node:18 as builder WORKDIR /app COPY . . RUN npm install && npm run build # Production stage FROM nginx:alpine COPY --from=builder /app/build /usr/share/nginx/html ๐Ÿ‘‰ Key concept: Reduce final image size Separate build & runtime ๐Ÿ” 4. Secrets Handl...
๐Ÿ”ฅ 1. Advanced Linux Basics (Expected Depth) ❓ What happens when you run a command in Linux? ๐Ÿ‘‰ Expected: Shell interprets command Checks PATH Forks process Uses exec() system call Kernel schedules execution ❓ Difference between process and thread? Process = independent memory Thread = shared memory within process ❓ What is load average? ๐Ÿ‘‰ Example: uptime 1 min, 5 min, 15 min CPU load Compare with CPU cores ⚙️ 2. Process Management (Scenario-Based) ❓ A process is consuming 100% CPU. What will you do? ๐Ÿ‘‰ Steps: top / htop ps -ef | grep renice -n 10 -p kill -15 kill -9 ❓ Difference between kill -9 and kill -15? -15 (SIGTERM) → graceful -9 (SIGKILL) → force kill ❓ How to find parent-child process? pstree -p ps -ef --forest ๐Ÿ’พ 3. Memory Management ❓ How Linux manages memory? ๐Ÿ‘‰ Answer: Physical memory + Swap Virtual memory Paging ❓ What is OOM Killer? ๐Ÿ‘‰ When memory is full → kills high memory process ❓ Check memory usage? free -m vmstat top ๐Ÿ“‚ 4. File System & Storage ❓ Differenc...
linux interview questions: ========================= Critical Linux Interview Questions (Experienced) ๐Ÿง  1. Troubleshooting Scenarios (MOST IMPORTANT) ๐Ÿ‘‰ Q1: Server is slow. How will you troubleshoot? Expected Approach: Check CPU: top / htop Check Memory: free -m Check Disk: df -h du -sh /* Check processes: ps -ef --sort=-%cpu Check I/O: iostat ๐Ÿ‘‰ Q2: Disk is full. What will you do? Answer: df -h du -sh /* | sort -hr Clean logs: /var/log Remove old files Use logrotate ๐Ÿ‘‰ Q3: System not booting. How to recover? Answer: Boot into rescue mode / single-user mode Fix: /etc/fstab GRUB issues Reinstall bootloader: grub2-install ๐Ÿ‘‰ Q4: Service is not starting. What to check? systemctl status journalctl -xe Check config files Check port conflicts: netstat -tulnp ๐Ÿ‘‰ Q5: High CPU usage. How to fix? top ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%cpu Kill process: kill -9 ⚙️ 2. Process & Resource Management ๐Ÿ‘‰ Q6: Difference between nice and renice? nice: start process with priority renice: chan...