Prepare and test your skills

Prepare and test your skills

Google Kubernetes Engine (GKE) (opens in a new tab) is a managed Kubernetes platform that runs containerized applications on Google Cloud infrastructure. GKE automates deployment, scaling, upgrading, and monitoring so teams can run complex microservices and stateful workloads with less manual work. Its business value is higher reliability and high availability with lower operational overhead, especially when a team needs to configure networking, scaling, hardware, and security for containers.
How GKE orchestrates containers is by grouping Compute Engine virtual machines as nodes into a cluster managed through the Kubernetes API. The control plane is a set of management nodes that run system components such as the Kubernetes API server, and Google Cloud manages the control plane for all clusters. In Autopilot mode, Google Cloud also manages the worker nodes, while in Standard mode the team manages worker nodes. A typical deployment flow follows a fixed order:
This structure lets GKE schedule many containers as one system instead of requiring administrators to create and shut down each container manually. Pods in the same Pod can share storage volumes, which allows data to survive container restarts and be shared among containers in that Pod.
GKE Autopilot and GKE Standard are the two cluster modes, and they differ in who manages nodes, how billing works, and how much control the team keeps. Autopilot is the default and recommended mode because Google Cloud manages both the control plane and worker nodes, continuously optimizes resourcing, and provides a Pod-level service-level agreement (SLA). Standard leaves node configuration and upgrades to the team but allows deeper customization. The choice depends on whether the priority is minimal operations or maximum control:
| Mode | Node management | Billing | Reliability and control |
|---|---|---|---|
| GKE Autopilot | Google Cloud manages worker nodes and the control plane | Pay only for compute resources that running Pods request | Pod-level SLA, built-in hardening and best-practice configurations |
| GKE Standard | Google Cloud manages the control plane, team manages nodes | Pay for all resources on nodes, regardless of Pod requests | Flexible node upgrade strategies, single-cluster scale up to 65,000 nodes |
Autopilot is the better choice when the goal is to reduce manual operations for long-lived or stateful workloads. Standard is the better choice when the workload needs custom node configuration, networking, security settings, or add-ons.
Automation that reduces manual operations in GKE covers scaling, repair, upgrades, observability, deployment, security, and cost. These automations keep applications running without constant intervention and help teams receive new features and security patches on time:
Together, these features shift routine infrastructure work from the team to the platform.
Reliability and high availability in GKE come from managed control planes, healthy worker nodes, and distributed traffic handling. GKE provides a greater than 99% monthly uptime service-level objective (SLO), and Autopilot clusters include a Pod-level SLA because Google manages the nodes. Highly available control planes and worker nodes are available in Autopilot mode and in regional Standard clusters. GKE also provides proactive monitoring and recommendations to reduce disruptions from upcoming deprecations, plus multi-cluster Service capabilities to help applications span clusters.
For traffic, GKE supports network load balancing and HTTP(S) load balancing. Network load balancing uses forwarding rules that point to target pools of instances and can balance TCP/UDP protocols. HTTP(S) load balancing uses a Kubernetes Ingress resource to route external traffic to Kubernetes endpoints and can provide HTTPS, content-based, and cross-region load balancing. Traffic therefore flows from clients to the load balancer and then to Pods across multiple nodes, so applications can stay available under load.
GKE for complex microservices and stateful workloads is the best fit when applications need persistent data, custom infrastructure, or fine-grained control. Stateful services can use persistent storage and attach volumes for data persistence and reliability, while complex microservices can manage dependencies with detailed control over resource allocation and scaling. In a retail example, product inventory management uses GKE because it is stateful and needs persistent storage, and a recommendation engine uses GKE because it is a complex microservice that benefits from fine-grained control. Cloud Run (opens in a new tab) can run alongside GKE in a hybrid strategy, with both platforms using standard container images, declarative YAML, Cloud Logging, Cloud Monitoring, and shared security tools, while load balancers can split traffic across both runtimes for gradual migration.
Exam tip: GKE Autopilot manages both the control plane and worker nodes, while GKE Standard manages the control plane but leaves node management to you.
Cloud Run (opens in a new tab) is a fully managed serverless platform that runs containerized applications directly on Google Cloud scalable infrastructure. A developer provides source code or a container image, and Cloud Run builds the container automatically when needed without creating a cluster or provisioning servers. Google Cloud manages infrastructure, routing, patching, and scaling, while the team focuses on code and deployment choices, which shortens the time from code change to running service.
How Cloud Run abstracts infrastructure management is by removing clusters, node pools, and virtual machine fleets from the team's responsibilities. Traffic flows from incoming requests to Cloud Run, and Cloud Run automatically routes each request to an appropriate backend container instance with built-in load balancing. Each revision automatically scales out to the number of container instances needed to handle all incoming requests and scales back when demand falls. When a revision receives no traffic, it scales to zero container instances by default, or it can keep one or more instances warm with a minimum-instances setting to avoid cold starts.
How pay-per-use billing improves cost efficiency in Cloud Run is by charging only for the time code is actually running, rounded up to the nearest 100 milliseconds. Costs flow from executed requests and running batch tasks to the bill, and idle periods with no traffic produce no compute charge because instances have scaled to zero. This model contrasts with always-on virtual machines that incur cost even when idle, and with Google Kubernetes Engine (GKE) (opens in a new tab) which charges per cluster per hour regardless of moment-to-moment use. Cloud Run also offers a free tier for small workloads and testing, which further lowers cost for variable, spiky, or low-traffic services.
Exam tip: Choose Cloud Run pay-per-use with scale-to-zero for variable or spiky traffic, and consider GKE fixed cluster costs when a workload has steady, predictable resource needs.
How Cloud Run accelerates time-to-market is through automatic build, deploy, scaling, and integration that let small teams release updates without infrastructure steps. Cloud Run supports two deployment models that cover most stateless patterns: Cloud Run services respond to web requests, and Cloud Run jobs perform one or more background tasks and then exit when the work is done. Code can come from individual lightweight functions, full applications from source code, or prebuilt container images, and the build-and-deploy path requires no custom configuration. Cloud Run also connects easily to other Google Cloud services, such as using event-driven functions to start batch processing jobs on Cloud Run for seamless workflows.
Workloads that gain the most business value from Cloud Run are stateless, request-driven, or event-driven services with changing demand. The business benefit is automatic scaling during traffic spikes without manual intervention, payment only during browsing, checkout, or batch execution, and faster deployments that improve user experience:
The split is practical: Cloud Run carries variable stateless services for serverless efficiency, while GKE carries stateful or complex services that need persistent storage and fine-grained control.
Strategic selection of container services is the choice between environmental control and operational simplicity without losing the ability to move workloads. Google Kubernetes Engine (GKE) (opens in a new tab) provides full Kubernetes control for complex and stateful needs, while Cloud Run (opens in a new tab) provides serverless simplicity for stateless and variable workloads. Both services use standard containers and compatible configuration models, so the same application can run on either platform and migrate as business needs change.
Environmental control with GKE means the team can customize the cluster that runs its containers. GKE runs containers on clusters of Compute Engine virtual machines grouped as nodes, with Google Cloud managing the control plane that includes the Kubernetes API server and system components. The team manages core Kubernetes aspects such as node configuration, networking, scaling, and upgrades, including node settings, network policies, security settings, and add-ons. GKE supports both stateless and stateful applications, including workloads that need persistent storage with attached volumes, and it uses pay-per-cluster per hour pricing regardless of Standard or Autopilot mode, size, or topology.
Simplicity and speed with Cloud Run come from running containers directly on Google Cloud scalable infrastructure without creating or managing a cluster. The team provides source code or a container image, and Cloud Run can build the container automatically, which removes infrastructure provisioning and cluster operations. Control is limited to application settings such as environment variables, concurrency, and network connections, which favors simplicity and speed over infrastructure customization. Cloud Run is best suited for stateless, request-driven or event-driven services such as websites, APIs, and batch jobs, with automatic scaling during traffic spikes and pay-per-use billing rounded up to the nearest 100 milliseconds.
Application portability across both services means the same standard container image can deploy on either runtime without modification. The shared container ecosystem, including storage in Artifact Registry and delivery with Cloud Deploy, keeps build and deployment decisions consistent while the runtime can change. Portability is supported by three compatible foundations:
Both runtimes also share operations that make migration practical. Metrics flow from GKE and Cloud Run to Cloud Logging and Cloud Monitoring for a centralized view, deployments flow from Cloud Deploy to either runtime or to both in parallel, and traffic can flow from a Global external Application Load Balancer to the same application on both platforms to shift traffic gradually.
Matching the service to business requirements means choosing control when the workload needs customization and choosing simplicity when the workload needs speed and efficiency. GKE fits complex microservices, stateful inventory or data services, and workloads that need custom storage, networking, or resource allocation. Cloud Run fits stateless web front ends, mobile back ends, APIs, and periodic batch work where automatic scaling and paying only during use improve agility and resource efficiency:
A decision tree that starts with a containerized workload and branches on statefulness, Kubernetes needs, and traffic patterns, leading to GKE for stateful or complex workloads with pay-per-cluster pricing and Cloud Run for stateless, variable workloads with pay-per-use pricing.
| Service | Control and management | Application types | Pricing |
|---|---|---|---|
| GKE | Team manages clusters, including nodes, networking, scaling, and upgrades, with full customization | Stateless and stateful apps, including complex microservices with specific resource needs | Pay-per-cluster per hour |
| Cloud Run | Google manages infrastructure; team supplies code or image with no cluster to manage | Stateless, request-driven or event-driven web services, APIs, and batch jobs | Pay-per-use, rounded to nearest 100 milliseconds |
Exam tip: Choose GKE when the workload needs Kubernetes control, persistent state, or custom infrastructure, and choose Cloud Run when the workload needs serverless simplicity, fast scaling, and pay-per-use for stateless demand.
Autopilot mode is the default and recommended mode where Google Cloud manages both the control plane and worker nodes, bills only for compute resources that running Pods request, and provides a Pod-level service-level agreement with built-in hardening. Standard mode leaves worker node configuration and upgrades to the team but allows deeper customization, bills for all resources on nodes regardless of Pod requests, and supports single-cluster scale up to 65,000 nodes.
Use Google Kubernetes Engine (GKE) when the workload is a complex microservice or stateful service that needs persistent storage with attached volumes, custom node configuration, networking, security settings, or fine-grained control over resource allocation and scaling. Use Cloud Run instead for stateless, request-driven or event-driven services such as websites, APIs, and batch jobs where automatic scaling and pay-per-use efficiency are the priority.
Cloud Run charges only for the time code is actually running, rounded up to the nearest 100 milliseconds, and each revision scales to zero container instances by default so idle periods with no traffic produce no compute charge. This contrasts with always-on virtual machines that incur cost even when idle and with Google Kubernetes Engine (GKE) which charges per cluster per hour, and Cloud Run also offers a free tier for small workloads and testing.
Google Kubernetes Engine (GKE) groups Compute Engine virtual machines as nodes into a cluster managed through the Kubernetes API, with Google Cloud managing the control plane that runs system components such as the Kubernetes API server. Applications are packaged into containers, deployed as sets of containers called Pods to nodes in the cluster, and then administered, scaled, and monitored through the Kubernetes API so many containers are scheduled as one system, and Pods in the same Pod can share storage volumes.
Last updated