1What is DevOps?
DevOps is a cultural and technical practice that integrates software development (Dev) and IT operations (Ops) to shorten the development lifecycle and deliver high-quality software continuously.
Please wait
Please wait
What is CI/CD in DevOps? What is containerization? Top 60 Most Asked DevOps interview questions and answers for freshers and mid-level engineers.
DevOps is a cultural and technical practice that integrates software development (Dev) and IT operations (Ops) to shorten the development lifecycle and deliver high-quality software continuously.
Key Benefits:
The main phases of the DevOps lifecycle are:
CI (Continuous Integration):
CD (Continuous Delivery/Deployment):
Version control tracks code changes, allowing multiple developers to collaborate safely.
Example tools: Git, GitHub, GitLab, Bitbucket
Popular DevOps Tools:
Infrastructure as Code (IaC) is managing infrastructure (servers, networks, etc.) using code instead of manual setup.
Tools: Terraform, AWS CloudFormation, Ansible
Agile:
DevOps:
Containerization packages applications with all dependencies, ensuring consistent environments across systems.
Docker simplifies creation, deployment, and management of containers.
Kubernetes (K8s) is a container orchestration platform used to automate deployment, scaling, and management of containerized applications.
A Jenkins pipeline automates build, test, and deployment processes using a scripted or declarative syntax in Jenkinsfiles.
Security Practices in DevOps:
Continuous Monitoring is monitoring application and infrastructure performance in real-time to detect and fix issues quickly.
Tools: Prometheus, Grafana, ELK Stack, Datadog
Continuous Delivery:
Continuous Deployment:
Configuration management ensures consistency across environments by automating setup and maintenance of servers using tools like Ansible, Puppet, or Chef.
Blue-Green Deployment involves maintaining two identical environments — Blue (current) and Green (new).
Traffic is switched to Green after successful testing, minimizing downtime.
A microservices architecture is an architectural style where an application is built as a collection of loosely coupled, independently deployable services.
Artifacts are compiled versions of code (e.g., JAR, WAR, Docker image).
Tools: Nexus, Artifactory, AWS CodeArtifact
Rollback means reverting to the previous stable version during a failed deployment using versioned builds, Kubernetes rollbacks, or CI/CD scripts.
Common Challenges:
Branching strategies define how teams manage features, releases, and fixes.
Common ones:
Merge:
Rebase:
A reverse proxy routes client requests to backend servers and provides load balancing, caching, SSL termination, and security.
Example: Nginx, HAProxy
Master Node:
Worker Node:
Helm is a Kubernetes package manager. A Helm chart defines a set of Kubernetes resources for deploying applications easily.
Terraform:
Ansible:
Immutable servers are never modified after deployment. Instead of updating, a new server instance is created with the required changes.
Include unit tests, integration tests, and end-to-end tests using frameworks like JUnit, PyTest, Selenium, etc., triggered automatically in Jenkins or GitHub Actions.
A load balancer distributes incoming network traffic across multiple servers to improve availability and performance.
Examples: Nginx, AWS ELB, HAProxy
Shifting left means performing testing, security checks, and validation earlier in the development cycle to detect issues sooner.
A canary deployment is a deployment strategy where a small subset of users gets the new version first. If stable, it gradually rolls out to everyone.
Monolithic:
Microservices:
Store API keys, passwords, and tokens securely using:
Observability = Monitoring + Logging + Tracing
It helps understand the internal state of systems using data such as logs, metrics, and traces.
Key Performance Indicators:
They store dynamic configuration data like API keys, ports, or database URLs — separate from code for portability and security.
Virtualization:
Containerization:
Logs track events and errors in applications. They are crucial for debugging, auditing, and performance optimization.
Tools: ELK Stack, Fluentd, Loki
A service mesh manages secure communication between microservices.
Examples: Istio, Linkerd
It handles traffic routing, retries, encryption, and monitoring.
A rolling deployment is a strategy where updates are deployed gradually to instances one at a time, ensuring zero downtime.
Docker Compose:
Kubernetes:
Security Practices:
Kubernetes automatically restarts the failed pod, reschedules it on another node if necessary, and maintains the desired state defined in the deployment.
Use Infrastructure as Code tools like Terraform and Configuration Management tools like Ansible to enforce consistent configurations automatically.
A sidecar container is a secondary container that runs alongside the main application container to handle auxiliary tasks such as logging, monitoring, or proxying (common in service meshes).
Blue-Green:
Canary:
Use:
This reverts the application to the previous stable version.
Vertical scaling:
Horizontal scaling:
Zero-Downtime Deployment Strategies:
Ingress manages external access to Kubernetes services, typically HTTP/HTTPS, allowing domain-based routing and SSL termination.
Terraform stores the infrastructure's state in a state file (terraform.tfstate) locally or remotely (e.g., AWS S3). This helps Terraform track changes and apply only the differences.
Terraform:
CloudFormation:
An ephemeral environment is a short-lived, on-demand environment (like a temporary test or staging setup) that's automatically created during CI/CD and destroyed after use.
Use APM (Application Performance Monitoring) tools like:
They track latency, CPU, memory, errors, and request rates.
High Availability Strategies:
Chaos engineering is a practice of intentionally introducing failures (e.g., shutting down instances) to test system resilience.
Tools: Chaos Monkey, LitmusChaos, Gremlin
Debugging Steps:
Environment Management:
They control which pods can be scheduled on which nodes.
Taint: Prevents pods from running on a node
Toleration: Allows specific pods to bypass the taint
Automated testing:
Continuous testing: