Compare / Compute Engine vs GKE

Compute Engine vs GKE

Compute Engine gives you virtual machines you configure and operate. GKE runs your containers on managed Kubernetes, so Google handles the control plane and, in Autopilot, the nodes too.

In 101 practice questions across 13 practice banks

Professional Cloud Developer Build & CI/CD

You are tasked with using C++ to build and deploy a microservice for an application hosted on Google Cloud. The code needs to be containerized and use several custom software libraries that your team has built. You want to minimize maintenance of the application’s underlying infrastructure. How should you deploy the microservice?

  1. Functions cannot host arbitrary native libraries.

  2. Cloud Build + Cloud Run is minimal-ops containerization.

  3. GKE Standard keeps cluster management.

  4. A VM is self-managed infrastructure.

Pick an answer to see why each option is right or wrong.

Try 20 questions free

At a glance

Compute EngineGKE
Unit you deployA virtual machine (or a group of them)Containers in pods
OperationsYou patch the OS and manage the software on each VMGoogle manages the control plane; node upgrades and repairs are automated
ScalingManaged instance groups with autoscalingHorizontal pod autoscaling plus cluster or node autoscaling
FitLift and shift, licensed or legacy software, full OS controlMicroservices, portable containerized apps
Learning curveFamiliar server modelKubernetes concepts: pods, services, deployments

Choose Compute Engine when

  • The workload is not containerized or needs a specific OS, kernel or licence.
  • You are lifting and shifting servers with minimal change.
  • You need full control over the machine, including GPUs or custom images.

Choose GKE when

  • The application is already containerized or built as microservices.
  • You want rolling updates, self-healing and bin-packing across a fleet.
  • You need the Kubernetes API for portability or an ecosystem of tooling.

Exam tip

Questions that stress "containers", "orchestration" or "microservices" lean to GKE. "Legacy application", "custom OS" or "lift and shift" lean to Compute Engine. If the app is a simple stateless container and nothing mentions Kubernetes, Cloud Run is often the intended answer instead.