Posts

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...
Kubernetes Practical Commands for Critical Interview Questions 1. Check Cluster Information kubectl cluster-info kubectl get nodes kubectl get componentstatus kubectl version 2. Check All Resources kubectl get all -A kubectl get pods -A kubectl get svc -A kubectl get deploy -A kubectl get rs -A 3. Pod Troubleshooting Check Pod Status kubectl get pods kubectl get pods -o wide kubectl describe pod pod-name View Logs kubectl logs pod-name kubectl logs -f pod-name kubectl logs pod-name --previous Login Into Pod kubectl exec -it pod-name -- /bin/bash kubectl exec -it pod-name -- sh 4. CrashLoopBackOff Troubleshooting kubectl describe pod pod-name kubectl logs pod-name --previous kubectl get events --sort-by=.metadata.creationTimestamp 5. Pending Pod Troubleshooting Check Events kubectl describe pod pod-name kubectl get events Check Node Resources kubectl top nodes kubectl describe node node-name 6. Deployment Commands Create Deployment kubectl create deployment nginx --image=nginx Scale Dep...

Kubernestes Interview questions

Frequently Asked Production Commands kubectl get all -A kubectl describe pod kubectl logs kubectl exec -it kubectl top nodes kubectl top pods kubectl get events kubectl rollout history kubectl cordon kubectl drain kubectl uncordon If you want, I can also provide: * Kubernetes scenario-based interview questions * Kubernetes troubleshooting questions * Kubernetes networking deep-dive * Kubernetes real-time production issues * Kubernetes interview answers in practical manner * Kubernetes mock interview for experienced meantime u have to give the commands for each questions Critical Kubernetes Interview Questions with Practical Commands 1. How do you check cluster information? Commands kubectl cluster-info kubectl get nodes kubectl get componentstatus kubectl version Purpose * Check API server * Check scheduler * Verify cluster health 2. How do you check all resources in Kubernetes? Commands kubectl get all -A kubectl get pods -A kubectl get svc -A kubectl get deployments -A kubec...

LInux Interview questions for experienced

1. Service Management (systemd) Q: How do you manage services in modern Linux? Answer: Using systemd Common commands: systemctl start nginx systemctl stop nginx systemctl restart nginx systemctl status nginx systemctl enable nginx systemctl disable nginx Q: Service is not starting. How will you debug? Answer: systemctl status journalctl -u Check: Syntax errors Port conflicts Permission issues Q: Difference between service and systemctl? service → old SysV init systemctl → modern systemd 🔹 2. Boot Process & Targets Q: Explain Linux boot process briefly Answer: BIOS → GRUB → Kernel → Init (systemd) → Services Q: How to change runlevel in systemd? Runlevels replaced by targets: systemctl get-default systemctl set-default multi-user.target systemctl isolate rescue.target 🔹 3. Process Management Q: How do you find high CPU process? top htop ps -aux --sort=-%cpu Q: Kill a process safely vs forcefully? kill -15 # graceful kill -9 # force Scenario: Q: Process keeps restarting au...

Linux Interview Questions for experienced

Q- How will you change the default user id value in Linux? Q- root# rm -rf /tmp/test gives error operation not permitted. Reason? Q- /etc/hosts (Which RPM is responsible for creating this file). Q- What is the difference between RPM and YUM? Q- What is the difference between Hard and Soft Link? Q- What is a sticky bit? Q- How will you check open ports on Linux Server? Q- How will you check open ports on remote servers (without login) Q- Your site is throwing 500 error, how will you start troubleshooting? Q- How will you start troubleshooting if your site is down? Q- How will you create space on disk if it is showing 100% used? Q- What is a package of sar command and what does it do?

Kubernestes interview questions

Core Kubernetes Concepts 1. What happens when you run kubectl apply -f deployment.yaml? API server receives request Validates YAML Stores desired state in etcd Scheduler assigns Pod to node Kubelet pulls image & starts container 2. Difference between Deployment, StatefulSet, and DaemonSet? Deployment → stateless apps (web apps) StatefulSet → stateful apps (DBs like MySQL) DaemonSet → runs one pod per node (logging, monitoring agents) 3. What is etcd? Distributed key-value store Stores cluster state (source of truth) 4. What is a Pod? Smallest deployable unit Can have one or multiple containers Shares network + storage 🔹 Networking (Very Important) 5. How does Kubernetes networking work? Each Pod gets unique IP Flat network (no NAT between pods) Uses CNI plugins (Calico, Flannel) 6. Difference between ClusterIP, NodePort, and LoadBalancer? ClusterIP → internal access NodePort → exposes via node IP LoadBalancer → cloud external LB 7. What is Ingress? HTTP/HTTPS routing Works with In...
Docker Interview Questions: 1).🔥 Docker Interview Questions (5+ Years Experience) 1. What is the difference between Docker Image and Container? Answer: * Image → Blueprint (read-only template) * Container → Running instance of image 👉 Example: docker build -t myapp . docker run -d myapp 2. Explain Docker Architecture Answer: * Docker Client * Docker Daemon (dockerd) * Docker Registry (Docker Hub / ECR) * Docker Objects (Images, Containers, Networks, Volumes) 👉 Check: docker info 3. What happens when you run docker run? Answer (Important): 1. Check image locally 2. Pull from registry if not present 3. Create container 4. Setup filesystem (UnionFS) 5. Allocate network 6. Start process 4. Difference: CMD vs ENTRYPOINT Answer: * CMD → Default command (can override) * ENTRYPOINT → Fixed command 👉 Example: CMD ["echo", "Hello"] ENTRYPOINT ["echo"] 5. Multi-stage build – Why? Answer: * Reduce image size * Remove build dependencies 👉 Example: FROM...
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...
terraform Interview Questions: ============================== 1).Terraform Practical Interview Questions (Experienced) 1. Real-time Scenario Questions 👉 Q1: You have created infrastructure manually in AWS. Now you need to bring it under Terraform. How will you do it? Expected Answer: Use terraform import Write resource block first Import using: terraform import aws_instance.myec2 i-1234567890 Run terraform plan to verify 👉 Q2: You deleted a resource manually in AWS, but Terraform state still has it. What will you do? Answer: Run: terraform refresh OR terraform apply Terraform will recreate the resource 👉 Q3: How will you handle multiple environments (dev, qa, prod)? Answer: Use: Workspaces Separate backend configs .tfvars files Example: terraform workspace new dev terraform workspace select dev 👉 Q4: How do you manage secrets in Terraform? Answer: Use: AWS Secrets Manager HashiCorp Vault Environment variables Avoid hardcoding in .tf files 👉 Q5: How do you handle remote state? Ans...
Docker Interview Questions: =========================== Docker interview questions: ================================ 18. How do you troubleshoot a failing container? * Check logs: docker logs * Inspect container: docker inspect * Exec into container: docker exec -it ================================================== 17. What is Docker Registry? A storage for Docker images (e.g., Docker Hub). ============================================== . How will you deploy a microservice using Docker + Kubernetes? ✅ Answer (structured & practical) First, I containerize the application using Docker. Step 1: Create Docker Image * Write a Dockerfile * Build image: docker build -t myapp:v1 . * Push to registry: docker push myrepo/myapp:v1 Step 2: Create Kubernetes Deployment Define a Deployment YAML: apiVersion: apps/v1 kind: Deployment metadata: name: myapp-deployment spec: replicas: 3 selector: matchLabels: app: myapp template: metadata: labels: app: ...
Aws Inteview questions: ===================== Aws Interview Questions: ============================= 1. Core AWS Concepts (Must Know) Q1: What is AWS Global Infrastructure? 👉 AWS consists of: * Regions * Availability Zones (AZs) * Edge Locations (CloudFront) 👉 Example: * Region → ap-south-1 (Mumbai) * AZ → ap-south-1a, 1b Q2: Difference between Region and Availability Zone? * Region = Geographical area * AZ = Isolated data centers inside a region Q3: What is IAM? Best practices? * Identity and Access Management * Controls access to AWS services ✅ Best Practices: * Use roles instead of access keys * Enable MFA * Follow least privilege principle 🔹 2. EC2 (Compute) Q4: What are EC2 instance types? * General purpose → t3, t2 * Compute optimized → c5 * Memory optimized → r5 * Storage optimized → i3 Q5: Difference between Spot, On-Demand, and Reserved Instances? Type Use Case On-Demand Short-term workloads Reserved Long-term, predictable Spot Cost saving (can be interrupted) Q6: Wha...
erraform: 1).which terraform command refreshes the state file refreshing the state file comparing it with real infiratsuruce Without changing. Resoirce ? Terraform refresh 2).what happens if two team members run ‘terraform apply’ simtanously on the same workplace into it ? One apply is failed . That time terraform state file is locked during the operations 3).which backend supports remote lociking natively ? S3 and DynamoDB 4).which terraofm block is responsible for defining the reusable infrsture template ? Modules 5).what will happens if a remove a resource from terraform code ,but keep the state file unchanged into it ? Terraofm shows it as the drift and remove it upon apply into it .. 6).what is the main purpose of terraform taint ocmmadn into terraform ? Resources would be recreated and destroy at next apply Which is already u can marked it as the stained. 7).which file should never be committed to git in real projects? Terraform .tfstsefile 8).what does terr...

Aws Interview Questions:

Aws Interview Questions: ======================= Aws Interview Questions: ============================ 1).How to setup the VPC , subnets , Nat gateway , Internet gateway and route table , routers into aws enviornment? 1).What is vpc and why its sued into it ? 2).What is subnets and how to create it? 3).What is natgateway and how to cadet it ? 4).What is Internet gateway and how to career it ? 5).What is route table and how to create it 6).What is routers and How to create it? ================================================================================ 1).what is internet gateway ? 2).what is avilobity zone? 3).what is cidr? 4).what is dynamoDB into aws eniornment> ================================= Top 25 Aws Service into our environment: =============================== 1).ec2 2).lightsail 3).lamda 4).autosacclng 5).loadbalncer 6).vpc 7).s3 8).galcier 9).ebs 10).efs 11).cloudwatch 12).cloudtrail 13).sns 14)sqs 15).elastic beanstalk 16).emr 17).kineses 18).ecs 19)eks...
Linux Interview Questions: ===============================\ 1).How much rate on yourself into linux os ? 2).how much rate on yourself into automations into shells scripting into long os ? 3).How to configure the nfs service into linux os ? 4).device busy error ? So what kind of steps u have to follow into it ? 5).have you worked across lvm into linux os ? 6).pv is failing ? So how to do that exactly into linux os ? 7).have you done filesystem reductions into lvm into linux os ? 8).file reductions happened for online and offline into linux os? 9).have you delete the logs whose ownership deleted before 45 mins before into linux os? 10).what is mtime ,atime and ctime into linux os ? 11).u are create the file under Splunk directory ok.and u are getting the permiooisn denied alert .teher is no space issue and no nose issues into linux os ? So how to troubleshooting into it ? 12).wta difernec ebtewene ext2 ,etx3 .ext4 and ifs filesystem into linux os ? 13).have you done patching into our en...