You have developed an application that consists of multiple microservices, with each microservice packaged in its own Docker container image.
You want to deploy the entire application on Google Kubernetes Engine so that each microservice can be scaled individually.
What should you do?
Click on the arrows to vote for the correct answer
A. B. C. D.D.
The correct answer to this question is D. Create and deploy a Deployment per microservice.
Google Kubernetes Engine (GKE) is a container orchestration platform that allows you to deploy, manage, and scale containerized applications. GKE uses a containerization technology called Docker to package and deploy microservices in isolated containers.
To deploy an entire application with multiple microservices on GKE, you need to package each microservice in its own Docker container image and then deploy them on GKE using a deployment strategy. Deployments are Kubernetes objects that represent a set of identical replicas of a microservice, and they provide declarative updates for Pods and ReplicaSets.
Creating and deploying a Deployment per microservice is the correct approach because it allows you to scale each microservice independently. You can set the number of replicas for each Deployment according to the required load and resource utilization of the microservice. This ensures that the resources are optimally utilized, and the application is highly available and fault-tolerant.
Option A, creating and deploying a Custom Resource Definition (CRD) per microservice, is not the correct approach because CRDs are used to define custom Kubernetes resources that are not available by default. They are typically used for creating new custom controllers, operators, or third-party resources, and they do not provide a deployment strategy.
Option B, creating and deploying a Docker Compose File, is not the correct approach because Docker Compose is a tool for defining and running multi-container Docker applications. It is not designed for deploying microservices on a container orchestration platform like GKE.
Option C, creating and deploying a Job per microservice, is not the correct approach because Jobs are used to run a batch of Pods that perform a specific task and then terminate. Jobs are not suitable for deploying long-running microservices that need to be highly available and scalable.