
Answer-first summary for fast verification
Answer: Adopt a Deployment per microservice.
**Correct Answer: D** - Adopting a Deployment per microservice is the recommended approach for deploying microservices on Kubernetes. Deployments provide declarative updates, scaling, and rollback features, ensuring the desired number of replicas are running, thus allowing individual scalability. **Why not A?** - Jobs are designed for batch processes or one-time tasks, not for continuously running microservices. **Why not B?** - Docker Compose files are not deployable on Kubernetes and lack Kubernetes' scalability and management features. **Why not C?** - Custom Resource Definitions are for extending the Kubernetes API, not for deploying microservices. For further reading: [Kubernetes Deployments vs StatefulSets vs DaemonSets](https://medium.com/stakater/k8s-deployments-vs-statefulsets-vs-daemonsets-60582f0c62d4) and [Kubernetes Deployment Documentation](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/).
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You are developing a cutting-edge social media platform utilizing a microservices architecture, with each microservice encapsulated in its own Docker container image. What is the optimal strategy for deploying the entire application on Kubernetes Engine to ensure each microservice can scale independently?
A
Utilize a Job per microservice.
B
Employ a Docker Compose File.
C
Implement a Custom Resource Definition per microservice.
D
Adopt a Deployment per microservice.
No comments yet.