Home DevOps Interview Questions
DevOps Interview Questions Hub: 416 Questions by Topic, Company and Level 416 DevOps interview questions with short answers in easy English. Filter by topic, company (TCS, Infosys, Wipro, Accenture, Amazon and more) and level. Company tags come from public interview stories.
मराठी पान · DevOps course · Ravi Sir's Cards
All topics Linux, Shell Scripting and Networking Git Docker Kubernetes Jenkins CI/CD, GitHub Actions and GitLab CI Terraform Ansible AWS Monitoring, Logging and SRE Scenario-Based DevOps HR and Managerial All companies Wipro LTIMindtree TCS Deloitte Tech Mahindra Infosys Capgemini Amazon Accenture Walmart Global Tech HCLTech Google IBM Flipkart Barclays Oracle Goldman Sachs All levels Fresher Experienced (2-5 yrs) Senior
Which AWS services have you used? What is the difference between EBS, S3 and EFS? What is EBS? What is the difference between a snapshot, a backup and an AMI? What are EC2 instance types? What are S3 storage classes? What is an S3 lifecycle policy? How do you secure an S3 bucket? What S3 encryption options are there? Is there a limit to the number of objects in an S3 bucket? What are the common uses of S3? What is a VPC? What is the difference between a public and a private subnet? What is the difference between an Internet Gateway and a NAT Gateway? What is the difference between a Security Group and a NACL? Why is a security group called stateful? What is the difference between an IAM role and an IAM policy? How do you audit IAM permissions? How do you give cross-account access? How can an EC2 in account A read an S3 bucket in account B? How do you connect an EC2 instance to RDS? How does RDS high availability work? What daily tasks do you do on RDS? How do you access an instance that has only a private IP? What is VPC peering and Transit Gateway? How can a private EC2 download packages without a NAT gateway? What are Route 53 routing policies? How do you reduce latency for users around the world? Which AWS services integrate with CloudFront? A load balancer shows high latency. How do you troubleshoot? What is Auto Scaling? What is the difference between scheduled and dynamic scaling? How do you make EC2 highly available across AZs? How do you migrate an EC2 instance to another region? You cannot SSH into an EC2 instance. What do you check? What is AWS Lambda? How do you deploy Lambda across environments? How do you connect on-prem to a VPC? How do you control AWS cost? How do you design disaster recovery on AWS? Design a 3-tier architecture for a banking app. How do you attach S3 to an EC2 instance? How do you check whether an S3 bucket exists with boto3? How does boto3 find credentials? Which AWS service is used for monitoring? How do you set up a CI/CD pipeline in Jenkins? What is the difference between declarative and scripted pipelines? How do you trigger a Jenkins job on a GitHub push? How do you manage secrets in Jenkins? How do you pass values between Jenkins stages? How do you roll back a failed deployment in Jenkins? What are Jenkins shared libraries? A Jenkins build fails. How do you debug it? What is a Jenkins agent (slave)? How do you back up Jenkins or a pipeline? What are the Maven build lifecycle phases? Which Maven commands do you use in a pipeline? What is a pom.xml dependency and how is it resolved? How do you set Java heap size for a build or app? How do you integrate code coverage in CI? How do you add a manual approval gate in Jenkins? What is the difference between Jenkins and Azure DevOps or GitLab CI? Write a Jenkins pipeline to build and push a Docker image. What is a multibranch pipeline? What is the post section in a declarative pipeline? How do you run Jenkins stages in parallel? How do you secure Jenkins? What is CI/CD? How is continuous integration achieved? What is the difference between continuous delivery and continuous deployment? Explain the flow from code commit to production deployment. How do you secure a CI/CD pipeline? What is SAST and DAST? How do you keep secrets out of pipeline logs? A pipeline takes 45 minutes. How do you speed it up? What is the difference between stages and jobs? How do you create reusable pipeline templates for 50 microservices? What is the difference between hosted and self-hosted agents/runners? How do you set up a CI/CD pipeline for microservices across many repos? What are artifacts in CI/CD? What deployment strategies do you know? How do you get zero-downtime deployments? What happens to in-flight requests during a blue-green switch? How do you deploy database changes in a pipeline? CI passes but CD fails. How do you investigate? Build time suddenly doubled. What do you check? What is GitHub Actions? How do you use secrets and OIDC in GitHub Actions? What is a matrix build? What is .gitlab-ci.yml? GitLab CI vs Jenkins: what would you choose? How do you add security tools to a CI/CD pipeline? How do you handle environments (dev, QA, prod) in a pipeline? What is the difference between a Docker image and a container? What is the lifecycle of a Docker container? How do you persist data in Docker? What is the difference between volumes and bind mounts? What is Docker Compose? How do you see container logs? How do you expose a container to the outside world? What is the difference between ENTRYPOINT and CMD? What is the difference between RUN and CMD? What is a multi-stage build? How do you reduce a Docker image size? Write a simple Dockerfile for a Node.js app. What are Docker network types? What is an overlay network? How do you scan Docker images for vulnerabilities? A container was killed with OOMKilled. What do you do? How do you cache Docker layers to speed up CI builds? How do you write a secure Dockerfile? How do you pass environment variables at build time vs run time? Which container registry would you choose and why? What is the difference between a virtual machine and a container? What Linux features make containers possible? A container keeps restarting. How do you debug it? What is .dockerignore? What is the difference between COPY and ADD? What is the difference between docker stop and docker kill? How do you get a shell inside a running container? What is a dangling image and how do you clean up Docker disk space? What is a container HEALTHCHECK? How do you limit CPU and memory for a container? What is Docker Hub? A container cannot reach the database. How do you check? DNS resolution fails inside a container. What do you check? What is a pod? What is kubectl describe vs kubectl logs? What is the difference between a rolling update and recreate strategy? What is the difference between docker run and docker start? What is a Docker registry? How do you add a user and give sudo access? How do you check the OS version and kernel? What does strace do? What is CPU steal time? How do you check memory usage? What is semantic versioning? What is a feature flag? What is Route 53? What is CloudTrail? What is a runbook? What is the difference between git merge and git rebase? What is the difference between git pull, git fetch and git clone? What is git stash? What is .gitignore? How do you resolve a merge conflict? What is git cherry-pick? How do you squash commits? How do you recover a deleted branch? What are Git tags and why use them? How do you revert a merge commit? How do you compare two branches? Which branching strategy have you used? How do you handle a hotfix in production? What is the difference between git reset and git revert? What is the difference between git reset --soft, --mixed and --hard? What is a pull request? What is the difference between Git and GitHub? What is git bisect? What is the staging area in Git? What is a detached HEAD? How do you remove a secret that was committed by mistake? What is git log --oneline --graph used for? What are Git hooks? What is the difference between git commit --amend and a new commit? What is a monorepo vs multi-repo setup? Tell me about yourself. Explain your current project. What are your daily responsibilities? Tell me about a time you had a conflict with a teammate. Tell me about a time you missed a deadline. Tell me about a failure. Tell me about a time you showed ownership. Tell me about a time you had to work with unclear information. Tell me about a time you convinced a client or manager. Tell me about a calculated risk you took. Tell me about improving operational excellence. How do you work in a team? Why do you want to join our company? Why are you leaving your current job? Where do you see yourself in five years? What are your strengths and weaknesses? Are you open to relocation and shifts? What are your salary expectations? Do you have any questions for us? How do you keep your DevOps skills up to date? How do you handle pressure during an outage? How do you explain a technical issue to a non-technical manager? Describe your experience with DevOps in the SDLC. How do you handle disagreement with a decision from your manager? Describe a time you mentored someone. What is Infrastructure as Code? What do terraform init, plan and apply do? What is the Terraform state file? How do you secure the Terraform state file? What is state locking and why is it needed? What are Terraform modules? How do you handle sensitive variables in Terraform? What do terraform validate and terraform fmt do? How do you manage multiple environments in Terraform? What are Terraform workspaces? What is drift and how do you detect it? What is the difference between count and for_each? What are dynamic blocks? What are lifecycle blocks? What is the difference between terraform plan, refresh and apply? How do you bring existing resources under Terraform? How do you manage resources created outside Terraform? How do you get VPC details dynamically in Terraform? The state file is corrupted. What do you do? How do you prevent concurrent Terraform runs? Terraform apply failed halfway. What do you do? Apply succeeded but resources do not work as expected. Why? How do you run Terraform in CI/CD? How do you manage a very large Terraform state? How do you deploy the same infrastructure to 10 regions? How do you make Terraform runs faster? What is the difference between Terraform and Ansible? What is the difference between CloudFormation and Terraform? Write Terraform code to create an EC2 instance. Write Terraform for a VPC with public and private subnets. How do module dependencies work in Terraform? What is a Terraform provider? What are outputs and variables in Terraform? What does terraform taint / -replace do? What do terraform state list, mv and rm do? What are common Terraform issues you faced? What is Ansible and what are its use cases? What is an Ansible playbook? What is an Ansible inventory? What are Ansible roles? What is Ansible Vault? What is idempotency in Ansible? What are handlers? Write a playbook to stop one of five data centres. What is the difference between ad-hoc commands and playbooks? What are Ansible facts? What are Jinja2 templates in Ansible? How does Ansible connect to Windows and Linux hosts? What is the difference between Ansible and Chef or Puppet? How do you run an Ansible task only on some hosts or conditions? What is become in Ansible? What is dynamic inventory? How do you test Ansible roles? What are the components of the Kubernetes control plane? What is etcd? What do kubelet, kube-apiserver and kube-proxy do? What is the difference between a Deployment and a StatefulSet? What is a DaemonSet? What is a Kubernetes Service and what are its types? What is the difference between a ConfigMap and a Secret? What are taints and tolerations? What are liveness, readiness and startup probes? A pod is in CrashLoopBackOff. How do you fix it? A pod is in ImagePullBackOff. What do you check? A pod is stuck in Pending. Why? What is the difference between HPA and VPA? What is the difference between HPA and Cluster Autoscaler or Karpenter? What are network policies? How do you set up RBAC for a namespace? What is an Ingress and an Ingress controller? What is the difference between Ingress and a service mesh like Istio? What is the difference between a ReplicaSet and a ReplicationController? What are init containers and sidecar containers? How do you roll back a Deployment? What is a PodDisruptionBudget? What do you check before upgrading a Kubernetes cluster? How do you debug DNS inside Kubernetes? How does a pod get its IP address? What is a Helm chart and its structure? How do you roll back a Helm release? How do you do blue-green or canary deployments with Helm? How do you exec into a pod? Write a Deployment and Service YAML. Only 7 of 10 pods are healthy. How do you investigate? Rollout succeeded but the old image is still running. Why? How do you securely manage secrets in EKS? How does authentication work in EKS? How would you set up an EKS cluster? What is the difference between EKS and ECS? How do you monitor microservices in Kubernetes? How do you make a Kubernetes cluster highly available? A node is degraded or lost permanently. What happens and what do you do? HPA is scaling too slowly. How do you fix it? Pods in one namespace fail readiness checks. How do you investigate? How do wrong probes cause downtime? What is a Namespace? What is the difference between requests and limits? What is a PersistentVolume and a PersistentVolumeClaim? What is securityContext in a pod? What is kubectl apply vs kubectl create? What is a Job and a CronJob? What is node affinity vs pod anti-affinity? What is a ResourceQuota and LimitRange? A Service has no endpoints. Why? What is GitOps and how does Argo CD work? How do you check running processes in Linux? What is the difference between top, htop and ps? How do you schedule a cron job every 15 minutes? What is the difference between a hard link and a soft link? How do you find which process is using the most memory? What happens when you run chmod 755 on a file? How do you find files larger than 1 GB? What is the difference between grep, awk and sed? What Linux commands do you use daily? Explain some useful options of the ls command. Explain different use cases of grep. How do you check disk usage and free space? df shows the disk is 100% full but du shows only 30% used. Why? What is an inode and what happens when inodes run out? How do you check the performance of a Linux server? Your system is running slow. How will you troubleshoot it? Explain the Linux boot process. How do you create and view a file in Linux? You cannot create a file. Give at least three reasons. Which command shows the first 5 lines of a file? What does the top command show? What is load average and how does it relate to CPU cores? How do you check which ports are listening? How do you troubleshoot an SSH connection failure? What are the different Linux distributions? What is the /proc file system? What is systemd and how do you manage a service? What is the difference between a process and a thread? What happens when you type ls in a shell? What is the difference between kill, kill -9 and kill -15? What is swap memory? How do you check logs on a Linux server? What is LVM and why use it? What is umask? What is the difference between sudo and su? What are good practices for Linux server hardening? Write a shell script to delete log files older than 7 days. Write a shell script to find the factorial of a number. Write a bash script to check disk and CPU usage and alert. Write a script to report the 10 biggest folders. From a CSV (NAME,GENDER,CITY,AGE), print males from Toronto aged 30-40. Write a script to find the most repeated phone number in a file. Parse a log file and count error codes. What kind of bash scripts have you written in your project? What is the difference between $@ and $*? What does set -euo pipefail do? How do you check if a file exists in bash? What is the exit status $? What happens when you type a URL in the browser? What is DNS and why is it needed? Why does DNS mostly use UDP and not TCP? How does DHCP work (DORA)? What is subnetting and why is it needed? What is the difference between TCP and UDP? Explain the TCP three-way handshake and connection close. Which ports do HTTP, HTTPS, SSH and MySQL use? What commands do you use to troubleshoot network issues in Linux? What is TTL in networking? What is a firewall? What is the difference between a forward proxy and a reverse proxy? What is the difference between public and private IP? What is the difference between a load balancer at layer 4 and layer 7? What is the difference between monitoring and observability? What are logs, metrics and traces? What tools have you used for monitoring? What is the default port of Prometheus? Explain Prometheus architecture. How do you monitor a Kubernetes cluster with Prometheus? How do you send Prometheus alerts to Slack? Prometheus is not showing metrics for a target. How do you fix it? How do you set up centralised logging? What is the ELK stack? What are SLI, SLO and SLA? What is an error budget? What are the four golden signals? What is toil? What does five nines availability mean? How do you set up CloudWatch and Grafana for AWS? How do you avoid alert fatigue? What is the difference between push and pull monitoring? What is PromQL? Give an example. What is distributed tracing? What is Grafana? What is blackbox monitoring? How do you monitor and fix pod errors in production? A production deployment failed midway. What do you do? Tell us about a production issue you solved. An app works in QA but fails in production. Why? A container's memory keeps growing. What do you do? The upload to cloud storage fails from your app. How do you debug? You find hardcoded secrets in the code. What do you do? A 3 GB Docker image is slowing deployments. How do you fix it? The application fails during traffic spikes. What do you do? A downstream service is slow and affects your service. What do you do? The cache is on, but database load is still high. Why? Latency increased but CPU is normal. What could it be? The deployment succeeded but errors increased. What do you do? Only some users are affected by an issue. How do you find the cause? Autoscaling did not help during an incident. Why? There are no errors in logs, but the app is slow. How do you debug? It is 3 AM and production is down. What do you do? A developer made a change directly in production. How do you handle it? How do you handle a P1 incident? The application is unresponsive. What do you check? The pipeline is failing. How do you debug it? The ingress controller crashes under high load. What do you do? A region goes down. How do you fail over? The backup bucket became unavailable. What do you do? A Docker policy-as-code tool blocked a deployment. How do you handle it? The private subnet ran out of IP addresses. What do you do? Someone changed a bucket policy manually and Terraform shows drift. What do you do? How do you migrate a monolith to microservices on Kubernetes? Disk is full on a production server. What do you do? An API returns wrong output. How do you debug it? Users cannot connect to the database. How do you investigate? How would you design a CI/CD system for 100 developers? You must upgrade Kubernetes with zero downtime. How? A certificate expired and the site is down. What do you do now and later? Terraform plan wants to destroy a production database. What do you do? How would you handle secrets errors in a deployment? Lessons