Quiz Module 12 - Production Deployment
Instructions
This quiz contains 30 multiple-choice questions.
Question 1
What is a best practice for deploying to production?
Show explanation
Correct answer: Set up high availability with multiple nodes
Explanation: High availability is essential in production to avoid single points of failure and ensure service continuity.
Question 2
What is a CI/CD pipeline?
Show explanation
Correct answer: An automated process that builds, tests, and deploys applications
Explanation: CI/CD (Continuous Integration/Continuous Deployment) automates the development, testing, and deployment process to accelerate and secure deliveries.
Question 3
What is GitOps?
Show explanation
Correct answer: A practice that uses Git as the source of truth for infrastructure and deployments
Explanation: GitOps uses Git as the single source of truth. Changes in Git automatically trigger synchronization with the Kubernetes cluster.
Question 4
What is ArgoCD?
Show explanation
Correct answer: A GitOps tool that automatically synchronizes Kubernetes applications from Git
Explanation: ArgoCD watches Git repositories and automatically synchronizes Kubernetes applications with the state defined in Git.
Question 5
What is a Resource Quota in Kubernetes?
Show explanation
Correct answer: A resource that limits the total amount of resources (CPU, memory) a namespace can use
Explanation: Resource Quotas limit the total resource consumption of a namespace, preventing a namespace from consuming all cluster resources.
Question 6
What is a LimitRange?
Show explanation
Correct answer: A resource that defines default limits and resource constraints for Pods in a namespace
Explanation: LimitRange defines default limits (requests/limits) for Pods that don't specify them, and validates that Pods respect the constraints.
Question 7
What is the best practice for high availability in production?
Show explanation
Correct answer: Use multiple nodes, replicate critical components, and set up Pod Disruption Budgets
Explanation: High availability requires multiple nodes, replication of critical components (Control Plane, applications), and PDBs to ensure availability during updates.
Question 8
What is a Canary Deployment?
Show explanation
Correct answer: A deployment strategy that deploys a new version to a small percentage of users to test before full deployment
Explanation: Canary deployments allow testing a new version with a small percentage of traffic before deploying to all users, reducing risks.
Question 9
What is a Blue/Green Deployment?
Show explanation
Correct answer: A deployment strategy that maintains two identical environments (blue and green) and switches traffic between them
Explanation: Blue/Green maintains two complete versions of the application and instantly switches traffic, allowing a quick rollback if needed.
Question 10
What is the best practice for managing secrets in production?
Show explanation
Correct answer: Use external secret management tools (Vault, AWS Secrets Manager) with automatic rotation
Explanation: Secrets should be managed through external tools with encryption, auditing, and automatic rotation, never committed to Git.
Question 11
What is a Disaster Recovery plan for Kubernetes?
Show explanation
Correct answer: A plan to restore the cluster and applications in case of a major failure
Explanation: A Disaster Recovery plan includes regular backups, replication across multiple zones, and tested restoration procedures.
Question 12
What is the best practice for backups in production?
Show explanation
Correct answer: Perform regular backups of etcd, configurations, and application data, with restoration tests
Explanation: Backups should include etcd (cluster state), configurations (Git), and application data (databases), with regular restoration tests.
Question 13
What is a GitHub Actions workflow for Kubernetes?
Show explanation
Correct answer: An automated CI/CD pipeline that builds, tests, and deploys Kubernetes applications
Explanation: GitHub Actions allows creating workflows that build Docker images, push them to a registry, and deploy them to Kubernetes automatically.
Question 14
What is the best practice for environments (dev, staging, prod)?
Show explanation
Correct answer: Separate environments with distinct namespaces or clusters, with appropriate security policies
Explanation: Environments should be separated (namespaces or clusters) with appropriate security policies, quotas, and access for each environment.
Question 15
What is an HPA (Horizontal Pod Autoscaler)?
Show explanation
Correct answer: A controller that automatically adjusts the number of Pod replicas based on CPU, memory, or custom metrics
Explanation: HPA monitors metrics and automatically adjusts the number of replicas to maintain performance under variable load.
Question 16
What is the best practice for optimizing costs in production?
Show explanation
Correct answer: Use HPA/VPA, define appropriate requests/limits, use spot instances, and monitor usage
Explanation: Cost optimization includes auto-scaling, appropriate requests/limits, using spot instances for non-critical workloads, and continuous monitoring.
Question 17
What is a VPA (Vertical Pod Autoscaler)?
Show explanation
Correct answer: A controller that automatically adjusts the CPU/memory requests and limits of Pods
Explanation: VPA analyzes actual resource usage and automatically adjusts requests and limits to optimize resource utilization.
Question 18
What is the best practice for security in production?
Show explanation
Correct answer: Apply RBAC with least privilege, Network Policies, Pod Security Standards, and image scanning
Explanation: Production security requires restrictive RBAC, Network Policies to isolate traffic, Pod Security Standards, and image scanning for vulnerabilities.
Question 19
What is a Cluster Autoscaler?
Show explanation
Correct answer: A component that automatically adjusts the number of nodes in a cluster based on demand
Explanation: Cluster Autoscaler adds or removes nodes automatically when Pods cannot be scheduled or when nodes are underutilized.
Question 20
What is the best practice for updates in production?
Show explanation
Correct answer: Use progressive deployment strategies (rolling updates, canary, blue/green) with tests and planned rollback
Explanation: Updates should be progressive with tests at each stage, allowing a quick rollback if problems are detected.
Question 21
What is Flux in the GitOps context?
Show explanation
Correct answer: A GitOps tool alternative to ArgoCD that synchronizes Kubernetes applications from Git
Explanation: Flux is another popular GitOps tool that uses Kubernetes operators to synchronize applications from Git.
Question 22
What is the best practice for monitoring in production?
Show explanation
Correct answer: Monitor application, infrastructure, and business metrics with actionable alerts and dashboards
Explanation: Comprehensive monitoring includes application metrics (latency, errors), infrastructure metrics (CPU, memory), and business metrics, with alerts for critical issues.
Question 23
What is Multi-Cluster Management?
Show explanation
Correct answer: Managing multiple Kubernetes clusters from a central point
Explanation: Multi-cluster management allows managing multiple clusters (dev, staging, prod, multi-region) from a centralized interface, facilitating deployments and governance.
Question 24
What is the best practice for testing before production?
Show explanation
Correct answer: Perform tests in dedicated environments (dev, staging) before production, with load and security testing
Explanation: Tests should be performed in dedicated environments before production, including unit, integration, load, and security tests.
Question 25
What is a Feature Flag in the context of deployment?
Show explanation
Correct answer: A mechanism that allows enabling or disabling features without redeploying the application
Explanation: Feature flags allow deploying code with disabled features, then gradually enabling them or quickly disabling them in case of problems.
Question 26
What is the best practice for documentation in production?
Show explanation
Correct answer: Maintain up-to-date documentation of architectures, deployment procedures, runbooks, and incident procedures
Explanation: Documentation should include architectures, operational procedures, runbooks for common incidents, and be kept up to date.
Question 27
What is a Runbook?
Show explanation
Correct answer: A document that describes procedures for resolving common incidents and operational problems
Explanation: Runbooks provide step-by-step procedures for resolving common problems, enabling quick and consistent incident resolution.
Question 28
What is the best practice for version management in production?
Show explanation
Correct answer: Use Semantic Versioning, tag Docker images, and maintain a deployment history
Explanation: Versioning should follow Semantic Versioning (MAJOR.MINOR.PATCH), Docker images should be tagged, and deployment history should be maintained to facilitate rollbacks.
Question 29
What is a Post-Mortem in the production context?
Show explanation
Correct answer: A retrospective analysis of an incident to understand what happened and how to prevent it in the future
Explanation: Post-mortems analyze incidents to identify root causes, lessons learned, and corrective actions to improve reliability.
Question 30
What is the best practice for governance in production?
Show explanation
Correct answer: Establish clear policies for deployments, security, resources, and compliance, with regular audits
Explanation: Governance establishes policies for deployments, security, resource quotas, and compliance, with regular audits to ensure adherence.
Quiz Results
Congratulations on completing the Module 12 quiz!
Score:
- 25-30 correct answers: Excellent! You have mastered production deployment and CI/CD.
- 20-24 correct answers: Very good! Review the concepts where you had difficulties.
- 15-19 correct answers: Good! Review the chapters on production and CI/CD.
- Less than 15: Recommended to review the module before continuing.
Quiz created on: December 2024