Devops interview questions for experienced:

DevOps Interview Questions for 5 Years Experienced (Practical + Real-Time) For 5 years experience, companies mostly expect: Linux Administration AWS / Cloud Docker Kubernetes Terraform Jenkins CI/CD Monitoring Troubleshooting Production Support Automation Security Basics 1. Linux Interview Questions Q1. How do you check CPU and memory usage? top htop free -m vmstat sar Q2. How do you check disk usage? df -h du -sh * lsblk Q3. How do you find top memory consuming process? ps -aux --sort=-%mem | head top Q4. How do you check open ports? netstat -tulnp ss -tulnp lsof -i Q5. How do you troubleshoot server down issue? Practical Steps ping server-ip ssh user@server top df -h free -m journalctl -xe systemctl status nginx 2. AWS Interview Questions Q6. How do you check EC2 server status? aws ec2 describe-instances Q7. How do you copy file to S3? aws s3 cp file.txt s3://bucket-name/ Q8. How do you sync folders to S3? aws s3 sync /data s3://backup-bucket Q9. How do you troubleshoot Load Balancer issue? Checks Target health Security group Listener Route table NACL Application logs Command curl -Iv http://loadbalancer-dns 3. Docker Interview Questions Q10. Difference between Docker Image and Container? Image = Template Container = Running instance Q11. Commands for Docker troubleshooting docker ps docker images docker logs container-id docker exec -it container-id bash docker inspect container-id Q12. How do you reduce Docker image size? Answer Use alpine image Multi-stage build Remove unnecessary packages Minimize layers Q13. Build Docker image docker build -t myapp . Q14. Run Docker container docker run -d -p 80:80 nginx 4. Kubernetes Interview Questions Q15. Pod is in CrashLoopBackOff. What will you do? Practical Commands kubectl get pods kubectl describe pod pod-name kubectl logs pod-name kubectl logs pod-name --previous kubectl get events Q16. Pod is Pending. How will you troubleshoot? kubectl describe pod pod-name kubectl top nodes kubectl describe node node-name Q17. How do you check cluster resources? kubectl top nodes kubectl top pods Q18. How do you rollout restart deployment? kubectl rollout restart deployment nginx Q19. How do you rollback deployment? kubectl rollout undo deployment nginx 5. Jenkins Interview Questions Q20. How do you trigger Jenkins pipeline? Jenkinsfile Example pipeline { agent any stages { stage('Build') { steps { sh 'mvn clean package' } } stage('Deploy') { steps { sh 'kubectl apply -f deployment.yaml' } } } } Q21. Jenkins build failed. How will you troubleshoot? Checks Console logs Jenkins agent Disk space Credentials Plugin issue Commands systemctl status jenkins journalctl -u jenkins df -h 6. Terraform Interview Questions Q22. How do you initialize Terraform? terraform init Q23. How do you check Terraform changes? terraform plan Q24. How do you apply Terraform? terraform apply Q25. Difference between count and for_each? count count = 3 for_each for_each = toset(["dev","prod"]) 7. Ansible Interview Questions Q26. How do you run playbook? ansible-playbook site.yml Q27. Small Playbook Example --- - hosts: web become: yes tasks: - name: Install nginx yum: name: nginx state: present 8. Monitoring Interview Questions Q28. How do you monitor servers? Tools Prometheus Grafana CloudWatch ELK Datadog Q29. How do you check logs? tail -f /var/log/messages journalctl -xe 9. CI/CD Questions Q30. Explain CI/CD pipeline. Flow Git Push → Jenkins → Build → Test → Docker Build → Push Image → Deploy Kubernetes Q31. How do you reduce deployment downtime? Answer Rolling updates Blue-Green deployment Canary deployment Health checks 10. Scenario-Based Questions Q32. Website is down. What will you check first? Practical Approach 1. Check DNS 2. Check Load Balancer 3. Check Server 4. Check Application 5. Check Database 6. Check Logs Commands ping domain.com curl -Iv domain.com systemctl status nginx kubectl get pods docker ps Q33. Server disk is full. What will you do? df -h du -sh /* find / -type f -size +500M Q34. Kubernetes deployment failed. What next? kubectl describe deploy app kubectl logs pod-name kubectl get events kubectl rollout undo deployment app Q35. CPU suddenly increased in production. top htop ps -aux --sort=-%cpu kubectl top pods 11. Git Interview Questions Q36. Git Commands git clone repo-url git status git add . git commit -m "message" git push git pull Q37. Git Merge Conflict Resolution git status git add . git commit 12. Networking Questions Q38. Difference between TCP and UDP? TCP = Reliable UDP = Fast Q39. Check connectivity ping telnet curl traceroute nslookup dig 13. Security Questions Q40. How do you secure Linux server? Answer Disable root login SSH key authentication Firewall Patch updates Fail2ban IAM least privilege 14. Important Production Commands top df -h free -m kubectl get pods -A kubectl describe pod kubectl logs docker logs terraform plan ansible-playbook systemctl status journalctl -xe MOST IMPORTANT REAL-TIME QUESTIONS Explain production issue you solved. Explain CI/CD architecture. Explain Kubernetes architecture. How do you reduce deployment time? How do you handle zero downtime? Explain monitoring setup. Explain backup strategy. Explain disaster recovery. Explain Terraform architecture. Explain autoscaling strategy.

Comments

Popular posts from this blog

Linux interview questions

Aws Interview Questions