|
| 1 | +# **Core Concepts - DevOps Fundamentals** |
| 2 | + |
| 3 | +## **Beginner Level (1-20 Questions)** |
| 4 | + |
| 5 | +### **1. What is DevOps?** |
| 6 | + |
| 7 | +**Answer:** DevOps is a set of practices that combine software development (Dev) and IT operations (Ops) to improve collaboration, automate workflows, and accelerate software delivery. |
| 8 | + |
| 9 | +### **2. What are the main goals of DevOps?** |
| 10 | + |
| 11 | +**Answer:** |
| 12 | + |
| 13 | +- Faster delivery of software |
| 14 | +- Improved collaboration between teams |
| 15 | +- Automation of repetitive tasks |
| 16 | +- Continuous feedback and improvement |
| 17 | + |
| 18 | +### **3. What are the key components of DevOps?** |
| 19 | + |
| 20 | +**Answer:** |
| 21 | + |
| 22 | +- **CI/CD** (Continuous Integration/Continuous Deployment) |
| 23 | +- **Infrastructure as Code (IaC)** |
| 24 | +- **Monitoring and Logging** |
| 25 | +- **Collaboration and Communication** |
| 26 | + |
| 27 | +### **4. How does DevOps differ from traditional IT operations?** |
| 28 | + |
| 29 | +**Answer:** DevOps focuses on automation, collaboration, and continuous feedback, whereas traditional IT operations follow a siloed approach with manual deployments and slow release cycles. |
| 30 | + |
| 31 | +### **5. What is Continuous Integration (CI)?** |
| 32 | + |
| 33 | +**Answer:** CI is a practice where developers frequently integrate code into a shared repository, followed by automated testing to detect errors early. |
| 34 | + |
| 35 | +### **6. What is Continuous Deployment (CD)?** |
| 36 | + |
| 37 | +**Answer:** CD is the automated release of validated code changes into production, ensuring rapid and reliable delivery. |
| 38 | + |
| 39 | +### **7. What is Infrastructure as Code (IaC)?** |
| 40 | + |
| 41 | +**Answer:** IaC is managing infrastructure using code, enabling automation, consistency, and easy scalability. Examples: Terraform, CloudFormation. |
| 42 | + |
| 43 | +### **8. What is version control, and why is it important?** |
| 44 | + |
| 45 | +**Answer:** Version control tracks code changes, enabling collaboration and rollback. Example: Git. |
| 46 | + |
| 47 | +### **9. What are some popular version control tools?** |
| 48 | + |
| 49 | +**Answer:** Git, GitHub, GitLab, Bitbucket, Subversion (SVN). |
| 50 | + |
| 51 | +### **10. What is a DevOps pipeline?** |
| 52 | + |
| 53 | +**Answer:** A DevOps pipeline automates software delivery using stages like build, test, deploy, and monitor. |
| 54 | + |
| 55 | +### **11. What is containerization?** |
| 56 | + |
| 57 | +**Answer:** Containerization packages applications with dependencies, making them portable and consistent across environments. Example: Docker. |
| 58 | + |
| 59 | +### **12. What are microservices?** |
| 60 | + |
| 61 | +**Answer:** Microservices are small, independent services that communicate via APIs, improving scalability and maintainability. |
| 62 | + |
| 63 | +### **13. What is a monolithic vs. microservices architecture?** |
| 64 | + |
| 65 | +**Answer:** Monolithic apps have a single codebase; microservices break the application into independent, loosely coupled services. |
| 66 | + |
| 67 | +### **14. What are some common DevOps automation tools?** |
| 68 | + |
| 69 | +**Answer:** |
| 70 | + |
| 71 | +- CI/CD: Jenkins, GitHub Actions |
| 72 | +- Configuration Management: Ansible, Puppet |
| 73 | +- Infrastructure as Code: Terraform |
| 74 | + |
| 75 | +### **15. What is Shift-Left Testing?** |
| 76 | + |
| 77 | +**Answer:** Shift-left testing integrates testing early in the development cycle to detect bugs earlier. |
| 78 | + |
| 79 | +### **16. What is observability in DevOps?** |
| 80 | + |
| 81 | +**Answer:** Observability provides insights into system health using logs, metrics, and tracing. |
| 82 | + |
| 83 | +### **17. What is a rollback strategy?** |
| 84 | + |
| 85 | +**Answer:** A rollback strategy reverts to a previous stable version if a new deployment fails. |
| 86 | + |
| 87 | +### **18. What is the role of a DevOps Engineer?** |
| 88 | + |
| 89 | +**Answer:** A DevOps engineer bridges development and operations, focusing on automation, CI/CD, and cloud management. |
| 90 | + |
| 91 | +### **19. What are feature flags in DevOps?** |
| 92 | + |
| 93 | +**Answer:** Feature flags allow toggling features on/off without deploying new code. |
| 94 | + |
| 95 | +### **20. What is a blue-green deployment?** |
| 96 | + |
| 97 | +**Answer:** Blue-green deployment maintains two environments, switching traffic between them for zero-downtime updates. |
| 98 | + |
| 99 | +--- |
| 100 | + |
| 101 | +## **Intermediate Level (21-40 Questions)** |
| 102 | + |
| 103 | +### **21. What is Site Reliability Engineering (SRE)?** |
| 104 | + |
| 105 | +**Answer:** SRE applies software engineering principles to operations, improving reliability and scalability. |
| 106 | + |
| 107 | +### **22. How does DevOps help in cloud computing?** |
| 108 | + |
| 109 | +**Answer:** DevOps automates infrastructure, deployments, and monitoring, making cloud environments scalable and efficient. |
| 110 | + |
| 111 | +### **23. What is Immutable Infrastructure?** |
| 112 | + |
| 113 | +**Answer:** Immutable infrastructure replaces servers instead of modifying them, ensuring consistency and reducing drift. |
| 114 | + |
| 115 | +### **24. How does DevSecOps integrate security into DevOps?** |
| 116 | + |
| 117 | +**Answer:** DevSecOps embeds security at every stage of the DevOps lifecycle, using automated security scans and compliance checks. |
| 118 | + |
| 119 | +### **25. What are the benefits of CI/CD pipelines?** |
| 120 | + |
| 121 | +**Answer:** |
| 122 | + |
| 123 | +- Faster releases |
| 124 | +- Automated testing |
| 125 | +- Reduced manual errors |
| 126 | +- Enhanced collaboration |
| 127 | + |
| 128 | +### **26. What is canary deployment?** |
| 129 | + |
| 130 | +**Answer:** Canary deployment gradually rolls out changes to a small user group before full deployment. |
| 131 | + |
| 132 | +### **27. What are some common monitoring tools?** |
| 133 | + |
| 134 | +**Answer:** Prometheus, Grafana, ELK Stack, Datadog, New Relic. |
| 135 | + |
| 136 | +### **28. What is Configuration Management in DevOps?** |
| 137 | + |
| 138 | +**Answer:** Configuration management automates infrastructure setup and maintenance. Examples: Ansible, Puppet, Chef. |
| 139 | + |
| 140 | +### **29. What is GitOps?** |
| 141 | + |
| 142 | +**Answer:** GitOps manages infrastructure using Git repositories, ensuring version control and automation. |
| 143 | + |
| 144 | +### **30. How do you handle secrets management in DevOps?** |
| 145 | + |
| 146 | +**Answer:** Using tools like HashiCorp Vault, AWS Secrets Manager, and Kubernetes Secrets. |
| 147 | + |
| 148 | +### **31. What is Chaos Engineering?** |
| 149 | + |
| 150 | +**Answer:** Chaos Engineering tests system resilience by introducing controlled failures. |
| 151 | + |
| 152 | +### **32. What is a service mesh?** |
| 153 | + |
| 154 | +**Answer:** A service mesh manages microservices communication using proxies like Istio and Linkerd. |
| 155 | + |
| 156 | +### **33. What is an API gateway?** |
| 157 | + |
| 158 | +**Answer:** An API gateway manages API traffic, security, and load balancing. |
| 159 | + |
| 160 | +### **34. How do you optimize CI/CD pipelines?** |
| 161 | + |
| 162 | +**Answer:** By parallelizing builds, caching dependencies, and using automated testing. |
| 163 | + |
| 164 | +### **35. What is hybrid cloud in DevOps?** |
| 165 | + |
| 166 | +**Answer:** A hybrid cloud combines private and public cloud environments. |
| 167 | + |
| 168 | +### **36. What is observability vs. monitoring?** |
| 169 | + |
| 170 | +**Answer:** Monitoring collects data; observability provides deeper insights into system behavior. |
| 171 | + |
| 172 | +### **37. What are Helm charts?** |
| 173 | + |
| 174 | +**Answer:** Helm charts package Kubernetes applications for easier deployment. |
| 175 | + |
| 176 | +### **38. What is A/B testing in DevOps?** |
| 177 | + |
| 178 | +**Answer:** A/B testing compares different versions of an application to determine the best performance. |
| 179 | + |
| 180 | +### **39. How do you handle database schema changes in CI/CD?** |
| 181 | + |
| 182 | +**Answer:** Using tools like Flyway or Liquibase for version-controlled migrations. |
| 183 | + |
| 184 | +### **40. What is autoscaling in cloud environments?** |
| 185 | + |
| 186 | +**Answer:** Autoscaling automatically adjusts resource allocation based on demand. |
| 187 | + |
| 188 | +--- |
| 189 | + |
| 190 | +## **Advanced Level (41-60 Questions)** |
| 191 | + |
| 192 | +### **41. What is the Twelve-Factor App methodology?** |
| 193 | + |
| 194 | +**Answer:** The Twelve-Factor App is a set of best practices for building modern, scalable cloud applications. The 12 principles focus on aspects like codebase, dependencies, configuration, logging, and disposability. |
| 195 | + |
| 196 | +### **42. How do you implement zero-trust security in DevOps?** |
| 197 | + |
| 198 | +**Answer:** Zero-trust security enforces strict identity verification and least-privilege access across the entire system. It includes: |
| 199 | + |
| 200 | +- Multi-factor authentication (MFA) |
| 201 | +- Role-Based Access Control (RBAC) |
| 202 | +- Encryption of data in transit and at rest |
| 203 | +- Continuous monitoring and logging |
| 204 | + |
| 205 | +### **43. What are sidecars in Kubernetes?** |
| 206 | + |
| 207 | +**Answer:** A sidecar is a helper container that runs alongside a main application container within the same pod. Sidecars enhance functionality without modifying the primary application (e.g., logging, monitoring, service mesh). |
| 208 | + |
| 209 | +### **44. How does Kubernetes handle self-healing?** |
| 210 | + |
| 211 | +**Answer:** Kubernetes ensures self-healing by: |
| 212 | + |
| 213 | +- Restarting failed containers |
| 214 | +- Rescheduling pods on healthy nodes |
| 215 | +- Automatically scaling replicas |
| 216 | +- Rolling back deployments if necessary |
| 217 | + |
| 218 | +### **45. What is progressive delivery?** |
| 219 | + |
| 220 | +**Answer:** Progressive delivery is an advanced deployment strategy that introduces new changes incrementally to users, using techniques like: |
| 221 | + |
| 222 | +- **Canary releases** (small group testing) |
| 223 | +- **Feature flags** (turning features on/off dynamically) |
| 224 | +- **A/B testing** (comparing multiple versions in production) |
| 225 | + |
| 226 | +### **46. What is a service mesh, and why is it important?** |
| 227 | + |
| 228 | +**Answer:** A service mesh (e.g., Istio, Linkerd) is a dedicated infrastructure layer that manages service-to-service communication in microservices architectures. It provides: |
| 229 | + |
| 230 | +- Traffic control (load balancing, retries) |
| 231 | +- Security (mutual TLS authentication) |
| 232 | +- Observability (tracing, metrics, logging) |
| 233 | + |
| 234 | +### **47. What is GitOps, and how does it improve DevOps workflows?** |
| 235 | + |
| 236 | +**Answer:** GitOps uses Git repositories as the single source of truth for declarative infrastructure and applications. Benefits include: |
| 237 | + |
| 238 | +- **Version-controlled deployments** |
| 239 | +- **Automated reconciliation of state** |
| 240 | +- **Increased security via RBAC** |
| 241 | + |
| 242 | +### **48. What is Blue/Green vs. Rolling deployment?** |
| 243 | + |
| 244 | +**Answer:** |
| 245 | + |
| 246 | +- **Blue/Green Deployment**: Two identical environments (Blue and Green). Traffic is switched instantly. |
| 247 | +- **Rolling Deployment**: Gradual update of application instances, minimizing downtime but increasing rollback complexity. |
| 248 | + |
| 249 | +### **49. How do you handle secrets management in DevOps?** |
| 250 | + |
| 251 | +**Answer:** Best practices for secrets management include: |
| 252 | + |
| 253 | +- Using **vault solutions** (e.g., HashiCorp Vault, AWS Secrets Manager) |
| 254 | +- Avoiding hardcoded secrets in code |
| 255 | +- Using **environment variables or encrypted configuration files** |
| 256 | + |
| 257 | +### **50. What is a chaos engineering experiment?** |
| 258 | + |
| 259 | +**Answer:** Chaos engineering involves intentionally introducing failures to test system resilience. Examples include: |
| 260 | + |
| 261 | +- **Network disruptions** (latency, packet loss) |
| 262 | +- **Server crashes** (killing pods or nodes) |
| 263 | +- **Resource exhaustion** (CPU/memory spikes) |
| 264 | + |
| 265 | +### **51. How do you implement compliance in DevOps pipelines?** |
| 266 | + |
| 267 | +**Answer:** Compliance can be enforced using: |
| 268 | + |
| 269 | +- **Automated security scans** (e.g., SonarQube, Snyk) |
| 270 | +- **Policy-as-Code** (e.g., Open Policy Agent) |
| 271 | +- **Audit logging and access controls** |
| 272 | + |
| 273 | +### **52. What is infrastructure drift, and how do you prevent it?** |
| 274 | + |
| 275 | +**Answer:** Infrastructure drift occurs when real-world infrastructure deviates from its declared state in code. Prevention methods: |
| 276 | + |
| 277 | +- **Use Infrastructure as Code (IaC) tools** |
| 278 | +- **Regularly run drift detection checks** |
| 279 | +- **Automate infrastructure provisioning** |
| 280 | + |
| 281 | +### **53. What is a deployment freeze, and when should it be used?** |
| 282 | + |
| 283 | +**Answer:** A deployment freeze is a temporary halt on new releases, typically during critical business periods (e.g., holiday sales, tax season). |
| 284 | + |
| 285 | +### **54. How do you ensure high availability in a DevOps environment?** |
| 286 | + |
| 287 | +**Answer:** High availability can be ensured through: |
| 288 | + |
| 289 | +- **Multi-region deployments** |
| 290 | +- **Load balancing & auto-scaling** |
| 291 | +- **Database replication & failover mechanisms** |
| 292 | + |
| 293 | +### **55. What is a multi-cloud strategy?** |
| 294 | + |
| 295 | +**Answer:** A multi-cloud strategy uses multiple cloud providers (e.g., AWS, Azure, GCP) to: |
| 296 | + |
| 297 | +- Reduce vendor lock-in |
| 298 | +- Improve redundancy and fault tolerance |
| 299 | +- Optimize costs |
| 300 | + |
| 301 | +### **56. How does FinOps fit into DevOps?** |
| 302 | + |
| 303 | +**Answer:** FinOps (Financial Operations) helps manage cloud spending efficiently. Practices include: |
| 304 | + |
| 305 | +- **Cost monitoring tools** (AWS Cost Explorer, Azure Cost Management) |
| 306 | +- **Auto-scaling and right-sizing resources** |
| 307 | +- **Tagging and budgeting policies** |
| 308 | + |
| 309 | +### **57. What are the challenges of DevOps adoption in large enterprises?** |
| 310 | + |
| 311 | +**Answer:** |
| 312 | + |
| 313 | +- **Legacy system integration** |
| 314 | +- **Security and compliance concerns** |
| 315 | +- **Cultural resistance to automation** |
| 316 | +- **Skill gaps within teams** |
| 317 | + |
| 318 | +### **58. What is a Kubernetes operator?** |
| 319 | + |
| 320 | +**Answer:** A Kubernetes Operator automates complex application lifecycle management tasks by extending Kubernetes capabilities using custom controllers. |
| 321 | + |
| 322 | +### **59. What are observability pillars in DevOps?** |
| 323 | + |
| 324 | +**Answer:** The three pillars of observability are: |
| 325 | + |
| 326 | +- **Logs** (text-based records of system events) |
| 327 | +- **Metrics** (numerical measurements like CPU usage) |
| 328 | +- **Tracing** (tracking requests across distributed systems) |
| 329 | + |
| 330 | +### **60. What are the best practices for incident response in DevOps?** |
| 331 | + |
| 332 | +**Answer:** |
| 333 | + |
| 334 | +- **Automated alerts and monitoring** (PagerDuty, Prometheus) |
| 335 | +- **Runbooks and playbooks for issue resolution** |
| 336 | +- **Post-mortems for continuous learning** |
0 commit comments