Prepare and test your skills
Prepare and test your skills
Selection and configuration of compute services is the process of matching a workload to the right Google Cloud service based on control, packaging, and scaling needs. Compute is virtualized processing power and memory, from raw virtual machines where you manage the operating system to managed platforms where Google manages infrastructure. The choice balances flexibility against operational effort while supporting availability and scalability.
The compute category covers five service areas. Compute Engine (Compute Engine (opens in a new tab)) provides configurable virtual machine (VM) and bare metal instances where you install and manage the operating system, including GPUs or TPUs. Google Kubernetes Engine (GKE) deploys and manages containerized applications with orchestration, Batch runs large-scale asynchronous jobs without managing VMs directly, AI infrastructure provides Cluster Director, Cluster Toolkit, GPUs, and TPUs for training and inference, and high performance computing (HPC) infrastructure provides specialized hardware for tightly coupled simulations such as weather models.
Infrastructure as a Service (IaaS) gives the most control because you manage the operating system, middleware, and applications while Google manages virtualization, servers, storage, and networking. Compute Engine lets you choose machine series, storage, accelerators, and guest systems, while Google Cloud VMware Engine lets you run VMware workloads natively without re-architecting. Traffic flows from users to your VMs, and your VMs depend on the networks, disks, and images you attach to them.
The choice between VMs, containers, and serverless is a trade-off between configuration flexibility and management effort. VMs and containers require you to manage resources and orchestration, while serverless runs on a preconfigured platform that scales with demand.
| Service | What you manage | Choose when |
|---|---|---|
| Compute Engine | Guest OS, middleware, applications, machine type, disks, and accelerators | The workload needs full OS control, custom networking, GPUs or TPUs, or lift-and-shift compatibility |
| Google Kubernetes Engine (GKE) | Container workloads, scaling policies, and in Standard mode node configuration | The workload is containerized and needs orchestration across many services |
| Cloud Run | Container image and request logic; no servers or clusters | The workload is request- or event-driven and should scale automatically |
Exam tip: Choose Compute Engine when OS-level control is required, GKE when container orchestration across services is required, and Cloud Run when you want serverless containers without managing servers or clusters.
Resource optimization in Compute Engine means matching capacity to actual use through VM size, cheaper provisioning models, scaling, and licensing. Machine type recommendations analyze CPU and memory use and suggest a closer-fitting predefined type, while custom machine types let you provision vCPUs and memory independently for predictable workloads. Bring your own licenses (BYOL) reuses existing licenses, custom shapes limit per-core cost, and disabling simultaneous multithreading reduces vCPUs per core from 2 to 1.
Spot VMs offer the same machine types and performance as standard VMs at a much lower price, but Compute Engine can stop or delete them at any time to reclaim zone capacity. Autoscaling in stateless managed instance groups (MIGs) adds VMs when traffic rises and removes them when demand falls, while stateful MIGs preserve disks and cannot be autoscaled. Reservations provide the opposite trade-off from Spot VMs by assuring capacity in a specific zone for a chosen machine type, even when the zone is constrained.
Automated provisioning uses instance templates to define machine type, image, network, and startup script for every VM a MIG creates. A regional MIG spreads those VMs across multiple zones for high availability, with the EVEN distribution shape recommended to keep counts within one unit across zones. The ordered workflow is first define the template, then create the regional MIG with distribution and placement policy, then attach the MIG to a load balancer with autoscaling and autohealing. Infrastructure as code stores those definitions in version control, with Infrastructure Manager, Config Connector, Terraform, Chef, and Puppet supporting declarative and immutable updates where VMs are redeployed rather than modified.
Continue with this study guide: Compute resource provisioning
Standard and Spot VMs differ in cost, capacity assurance, and lifecycle stability. Standard VMs use on-demand pricing, run until you stop or delete them, and support live migration and automatic restart during host events. Spot VMs use excess Compute Engine (Compute Engine (opens in a new tab)) capacity at discounts of up to 91% on vCPUs, memory, GPUs, and Local SSD disks, but they offer only best-effort availability with no Service Level Agreement (SLA).
| Model | Pricing | Capacity and lifecycle |
|---|---|---|
| Standard VMs | Standard on-demand rates while in use | Runs until stopped or deleted; supports live migration and automatic restart |
| Spot VMs | Discounted up to 91% while in use | Best-effort from excess capacity; stopped by default or deleted at any time |
Spot VMs provide the same machine types, options, and performance while running, but premium OS licenses are not discounted and Spot VMs cannot live migrate or automatically restart. When preemption occurs, the Spot VM moves from running to stopped or deleted based on its termination action, and local data such as Local SSD content is lost. Internal and external IP addresses may also change after recreation.
Matching workloads to volatility means placing fault-tolerant work on Spot VMs and mission-critical work on standard VMs. Spot VMs suit stateless, fault-tolerant work that can fail gracefully and resume, such as batch processing, data analytics, high performance computing, media encoding, and distributed training. If some Spot VMs stop during a batch job, the job slows but does not completely stop.
Choose standard VMs when the workload requires continuity, capacity assurance, or state preservation:
A mixed architecture keeps a stable base on standard VMs and adds volatile capacity on Spot VMs. In GKE, critical Pods run on a standard node pool and batch Pods run on a Spot node pool, with node taints and tolerations keeping critical work off Spot nodes. In a MIG, the group depends on its instance template and repeatedly tries to recreate stopped Spot VMs once capacity returns, but it may fail to reach target size during a shortage.
Exam tip: Choose Spot VMs when the workload can withstand preemption and has no SLA requirement; choose standard VMs when the workload needs stable capacity, automatic restart, or maintenance protection.
Preemption handling keeps fault-tolerant work moving when capacity is reclaimed by running cleanup during the short window before shutdown. Typical cleanup stops the process gracefully and uploads a checkpoint file to Cloud Storage, so work can resume elsewhere. Spot VMs support two handling patterns that depend on the configured notice duration.
| Handling option | Notice configuration | Where cleanup code runs |
|---|---|---|
| Shutdown script handling | 0s, the default with no notice period | Cleanup runs in a shutdown script during best-effort shutdown up to 30 seconds |
| In-workload handling | 120s preemption notice duration | Workload code reacts during the notice period, with optional shutdown script afterward |
Detection and testing verify that handling works before a real event. Inside the VM, code can poll for the preemption signal, while operators can list system operations filtered for preemption with status DONE and message Instance was preempted. Simulated maintenance events force preemption on demand to confirm checkpoints upload and replacements start correctly. Resilience increases with regional MIGs that spread instances across zones, instance flexibility that prefers machine types with lower preemption rates, autohealing health checks, and checks of real-time availability and pricing before creation.
Continue with this study guide: Compute volatility configuration (spot vs. standard)
VPC networking for Compute Engine and GKE defines how VMs and Kubernetes Pods communicate securely inside a Virtual Private Cloud (VPC) network. Every Compute Engine VM and GKE node sits in a VPC subnet and receives an internal IP address from the subnet range, and resources in the same VPC reach each other over internal addresses when firewall rules permit. VMs with only internal addresses can still reach Google APIs through Private Service Connect or Private Google Access, while Cloud NAT handles outbound traffic and Secure Web Proxy handles HTTP(S) egress with identity controls.
Shared VPC centralizes administration when Compute Engine and GKE live in separate projects. A host project holds the VPC network and subnets, while service projects attach and deploy VMs or clusters into approved subnets. Setup follows an ordered dependency: first create the host project, then enable the Compute Engine API, then enable Shared VPC, then create a custom-mode VPC network, then create subnets with Private Google Access. GKE automatically enables Private Google Access on node subnets so nodes without external addresses can reach Google-managed services.
Cloud Next Generation Firewall (Cloud NGFW) enforces stateful filtering on each VM, including GKE nodes. Best practice uses fewer broader rules, least-privilege allow rules, logging, and Firewall Insights, with priorities ordered from incident response to always-blocked traffic to workload rules to catch-all rules. Hierarchical policies permit Identity-Aware Proxy (IAP) TCP forwarding from 35.235.240.0/20 for ports 22 and 3389 and permit load balancer health checks from 35.191.0.0/16 and 130.211.0.0/22 for ports 80 and 443.
GKE VPC-native networking makes Pod addresses part of the VPC through alias IP ranges, so Pod traffic is native VPC traffic. Each cluster depends on the VPC subnet plus extra IP space for Pods and Services, which requires planning for Pod density, autoscaler growth, load balancer subnets, and address reuse. Best practice uses custom subnet mode, uses non-RFC 1918 space when needed, and avoids overlap with on-premises or peered networks. For egress, Cloud NAT lets Pods initiate outbound internet connections, Private Google Access reaches Cloud Storage or Cloud SQL without the internet, and Cloud VPN or Cloud Interconnect connects the VPC to on-premises.
Kubernetes NetworkPolicy controls east-west traffic between Pods by selecting Pods by label and restricting ingress and egress by labels, IP ranges, and ports. By default all Pods can communicate freely, but once a NetworkPolicy selects a Pod, only explicitly allowed connections are permitted. VPC firewall rules protect GKE nodes at Layer 3 or Layer 4, while NetworkPolicy protects Pods at Layer 3 or Layer 4, so both are needed for defense in depth. External north-south access flows from internet clients to Cloud Load Balancing to Ingress to the Service to selected Pods, with loadBalancerSourceRanges, Cloud Armor, and IAP providing edge filtering.
Exam tip: VPC firewall rules filter traffic at the GKE node level, while Kubernetes NetworkPolicy filters traffic at the Pod level; use both together and never assume a node rule provides Pod-to-Pod isolation.
Serverless connectivity lets Cloud Run, Cloud Run functions, and App Engine standard reach private VPC addresses without the public internet. Direct VPC egress sends traffic directly into the VPC network, while a Serverless VPC Access connector sends traffic through a regional connector with its own IP range such as 10.8.0.0/28. Use Direct VPC egress when available to avoid connector management, and use a connector only when direct egress is not an option. Private Service Connect (PSC) works in the opposite direction by exposing Google APIs or producer VPC services through a private endpoint in the consumer VPC, including access from on-premises over VPN or Interconnect.
Google Cloud VMware Engine (GCVE) (Google Cloud VMware Engine (opens in a new tab)) runs the VMware platform on dedicated bare metal as a private cloud with vSphere, vCenter, vSAN, NSX-T, and HCX. Workload VMs receive addresses from NSX-T segments, with Layer 3 routing by default and Layer 2 stretched segments for workloads that cannot be readdressed. Customer VPCs connect to the Google-managed tenant VPC through private services access peering, Cloud DNS resolves management appliances, and Cloud VPN or Cloud Interconnect provides hybrid reach to on-premises. VMware HCX then migrates VMs over that private path while preserving IP and policy context.
Centralized inspection places third-party appliances on Compute Engine between the internet, on-premises, and GCVE segments. Public interfaces sit in an external customer VPC and GCVE-facing interfaces sit in an internal customer VPC peered to the tenant VPC. Cloud Load Balancing serves as the frontend, not built-in NSX-T load balancers, with appliances performing destination NAT from the public IP to the VM IP and source NAT on return traffic for symmetric flow. Different goals select different frontends, from regional passthrough Network Load Balancers for Layer 4 to global Application Load Balancers with Cloud Armor and CDN for Layer 7 to internal passthrough load balancers for private inspection and controlled egress.
Automated resource configuration defines compute once and lets Google Cloud create identical VMs automatically. A Compute Engine (Compute Engine (opens in a new tab)) instance template is an immutable blueprint that standardizes machine type, boot image, network, labels, service account, scheduling, and metadata for every VM in the group. A managed instance group (MIG) depends on that template, keeps the group at its targetSize, names VMs from its baseInstanceName, and recreates failed VMs from the same blueprint.
Instance metadata carries per-machine configuration that each VM reads at boot, with the startup-script key carrying a shell script that runs automatically on first boot. Data flows from template metadata to each new instance, then the guest OS installs software, writes files, and starts services without manual login. A typical script updates packages, installs apache2 or nginx, queries the metadata server at http://metadata.google.internal with header Metadata-Flavor: Google to learn its name or IP, writes that value to the web page, and restarts the server.
Deploying a standardized tier follows an ordered workflow:
targetSize such as 2.http:80 so the backend service routes to the correct port.create_before_destroy for template updates.Exam tip: Choose a new instance template version when configuration must change; existing MIG instances do not pick up template edits, they are replaced from the new template.
VM Manager is a suite for managing operating systems across large fleets of Windows and Linux VMs on Compute Engine. The suite shares the OS Config agent but divides work among three services: Patch applies on-demand or scheduled updates, OS inventory management collects installed package data, and OS policies maintains desired package state. Inventory shows what is installed and missing, Patch remediates vulnerabilities, and OS policies keeps required software in place.
VM Manager depends on project setup and agent activation before any service can run. The OS Config service API must be enabled and the OS Config agent activated through instance metadata, with support only for English-locale systems. The agent calls system tools such as yum, apt, or Windows Update Agent to retrieve patches, so VMs must reach package repositories directly or through Private Google Access. A Google-managed service agent collects VM data for patch jobs, with granular roles such as patch job executor and viewer controlling access.
A patch job moves through an ordered sequence from configuration to verification: first run an optional pre-patch script, then retrieve and apply updates, then reboot as configured, then run an optional post-patch health check. Safe fleet patching uses labels such as env:dev and tier:frontend for targeting, staggers jobs zone by zone, and sets a zone disruption budget for concurrent disruptions. By default VM Manager does not patch MIG members unless migInstancesAllowed is true, and MIG repair or autoscaling can replace patched VMs with unpatched images from the template. Patch jobs run only within a single project, while compliance dashboards can show patch status across an organization or folder by severity: critical, important or security, other, and up-to-date.
Infrastructure as Code (IaC) defines provisioning in code files stored in source control instead of manual console steps. Changes flow through continuous integration and continuous deployment (CI/CD) pipelines for testing and consistent rollout, which reduces human error. Immutable infrastructure extends this idea by never modifying deployed resources in place but redeploying them fully from updated definitions, which avoids configuration drift and snowflake servers.
Terraform is the recommended declarative tool where configuration declares desired state and Terraform creates, updates, or destroys resources to match it. Typical resources include GKE clusters with GPU node pools, Agent Platform endpoints, and Cloud Storage buckets, with state stored centrally in a Cloud Storage backend to prevent conflicts. Infrastructure Manager runs Terraform from Google Cloud without a separate automation server, Config Connector manages Google Cloud resources as Kubernetes objects, and Chef, Puppet, and Cluster Toolkit blueprints support specialized provisioning. Identity and Access Management grants follow the same model, where iam_policy and iam_binding overwrite all permissions while iam_member adds a single grant.
Infrastructure Manager orchestration executes Terraform in an ephemeral Cloud Build environment that is discarded after the run. Data flows from the stored module to the Cloud Build job to provisioned resources in order: first download the module, then run terraform init, then run terraform validate, then run terraform apply or terraform destroy, then stream logs to storage, then retry transient failures automatically. Maturity grows from Adopt with unstructured configuration and manual deployment, to Build with centralized state and CI/CD, to Scale with versioned configuration, cloud management integration, and strong security and compliance controls.
Google Kubernetes Engine (GKE) (Google Kubernetes Engine (opens in a new tab)) is a managed service to deploy, manage, and scale containerized workloads on Kubernetes. GKE builds on Compute Engine, so Compute Engine practices for load balancing, autoscaling, reservations, and storage partly apply to GKE nodes. GKE Standard and Autopilot modes define who manages nodes and how billing works.
| Mode | Node management | Billing | Best fit |
|---|---|---|---|
| GKE Standard | Operator configures node pools, machine types, and scaling | Billed for VM infrastructure backing each node regardless of use | Workloads needing custom nodes or direct control |
| GKE Autopilot | GKE manages nodes and OS updates automatically | Billed only for CPU, memory, and ephemeral storage requested by Pods | Workloads wanting low overhead without bin-packing |
Regional and zonal control planes define what survives a zonal failure. A regional cluster runs control plane replicas across multiple zones, while a zonal cluster runs a single control plane in one zone and cannot be reconfigured during an outage of that zone. All Autopilot clusters are regional, Standard clusters can be regional or zonal, and regional clusters are recommended for production. Node location further controls availability: single-zone clusters place all nodes in one zone, while multi-zonal clusters spread nodes across zones so work remains available elsewhere during a zonal outage. Administration separates Google Cloud tools for lifecycle and IAM from kubectl and Kubernetes APIs for workloads, RBAC, and network policies.
Exam tip: Autopilot clusters are always regional, while Standard clusters can be regional or zonal; choose regional when high availability of the control plane matters.
Network connectivity and security posture in GKE moves the default-open cluster network to least-privileged interaction. By default every Pod can reach every other Pod, so isolation requires explicit policy. Least privilege allows only necessary connections, defense in depth layers independent controls, and actionable data uses logging and risk assessment to verify policy.
Kubernetes Services provide stable endpoints for groups of Pods selected by labels, so microservices use a Service name rather than changing Pod IPs. Ingress manages external HTTP and HTTPS access through the GKE ingress controller. Traffic flows in fixed order: first clients send requests to Cloud Load Balancing, then the load balancer forwards to Ingress, then Ingress routes to the backend Service, then the Service forwards to selected Pods. Cloud Armor adds IP allow and deny lists at this boundary, while Identity-Aware Proxy can control application-level access.
NetworkPolicy controls Pod-to-Pod ingress and egress within a namespace using Pod labels and namespaces, moving selected workloads from open to least-privileged communication. ClusterNetworkPolicy provides cluster-scoped guardrails managed by administrators across all namespaces, with Admin and Baseline tiers sitting above namespace policies. Workload Identity Federation for GKE maps a Kubernetes service account presented by a Pod to a specific Google Cloud service account, so Google Cloud authorizes only the API actions granted to that mapped account. Private nodes, authorized networks, VPC-native alias IPs, and IP masquerading further reduce exposure.
Workload scaling in GKE automatically matches Pod and node capacity to traffic using separate controllers for replicas, container size, and nodes. The Horizontal Pod Autoscaler (HPA) changes replica count by scaling out when utilization stays above target and scaling in when it stays below target. Deployments must set CPU requests for measurement to work, with targets such as 70% or 80% leaving buffer for surges. The HPA scales on CPU and memory out of the box, on load balancer requests-per-second, or on custom metrics flowing from the application to Cloud Monitoring through the adapter to the HPA.
The Vertical Pod Autoscaler (VPA) changes Pod size by adjusting CPU and memory requests based on historical use rather than current load. The VPA increases requests to prevent contention and decreases requests to reduce waste, which suits workloads not using the HPA or with unknown peaks. Safe adoption keeps the VPA in Off recommendation mode for at least 24 hours, ideally one week, then sets explicit minimum and maximum bounds before enabling Initial or Auto. The Cluster Autoscaler changes node count based on schedulability: it adds nodes when Pods remain Pending and removes underutilized nodes after consolidation, with PodDisruptionBudgets limiting how many Pods can be unavailable during eviction.
| Autoscaler | Reacts to | Scales what |
|---|---|---|
| Horizontal Pod Autoscaler | Current load above or below target | Number of Pod replicas |
| Vertical Pod Autoscaler | Historical usage too high or too low | CPU and memory requests per Pod |
| Cluster Autoscaler | Pending Pods or underutilized nodes | Number of nodes in node pools |
In a surge, the flow moves in order: first the HPA increases replicas, then the scheduler attempts placement, and only after Pods remain Pending does the Cluster Autoscaler add nodes. The shared dependency for built-in scaling is Metrics Server, which retrieves container metrics from kubelets for the HPA and VPA to read.
Continue with this study guide: Container orchestration
Deployment models for serverless computing run code without managing servers or clusters with automatic provisioning and scale to zero. Cloud Run (Cloud Run (opens in a new tab)) runs containers and services on scalable infrastructure, while Cloud Run functions (formerly Cloud Functions) runs lightweight event-driven functions. Billing is pay-per-use rounded to the nearest 100 milliseconds.
Cloud Run services are request-driven deployments where a developer provides source or a container image and Cloud Run routes requests to container instances with automatic load balancing. Each revision scales to the instances needed for incoming requests and scales to zero by default when idle, while minimum instances can keep instances warm to reduce cold starts at higher cost. Services suit stateless web apps and APIs using frameworks such as Nginx, Express.js, and Django. Cloud Run jobs are finite executions that start a container, run batch work such as catalog updates to completion, and then finish without serving traffic. Cloud Run functions respond to cloud events where data flows from the event source through Eventarc or Pub/Sub to the function, which can then call downstream systems such as Cloud Run to start broader workflows.
Storage, networking, and operations define where state lives and how traffic arrives. Temporary files written inside a container consume service memory and disappear when the instance stops, so persistent state depends on external systems such as Cloud Storage for objects, Firestore for documents, and Cloud SQL for relational data. Networking starts with automatic request routing, with optional HTTP(S) load balancing for CDN caching and multi-region serving, plus Direct VPC egress and serverless endpoint groups for private reach. Request logs and container logs flow to Cloud Logging, while metrics and alerts flow to Cloud Monitoring.
| Deployment model | Primary unit | Choose when |
|---|---|---|
| Cloud Run services | Container image or source | The workload is a stateless web service or API with HTTP concurrency |
| Cloud Run jobs | Container task | The workload is finite batch work that runs to completion |
| Cloud Run functions | Event-driven function | The workload is lightweight logic reacting to storage, messaging, or schedule events |
Serverless autoscaling adds and removes instances automatically to match traffic without operator configuration. Traffic flows from clients to the Cloud Run service or function, the platform adds instances for current load and removes them when load drops, and idle services scale to zero so no compute is paid for. This contrasts with Compute Engine MIGs and GKE, which typically keep minimum VMs or nodes running because new capacity takes time to initialize. Surrounding services such as Pub/Sub, Eventarc, Workflows, BigQuery, and Spanner are also elastic, so the full path can expand and contract together.
Baselines, profiles, and stateless design control how much capacity stays ready. A scaling profile combines performance goals, cost limits, and minimum resources, with latency-sensitive consumer apps justifying more baseline than delay-tolerant internal apps. Storing session state outside the instance, such as in Memorystore for Redis, lets any instance serve any user so the compute tier depends on the external store without losing sessions during scale-in. Startup time then determines whether new capacity serves traffic fast enough, where a cold start is the delay when a scaled-to-zero instance must initialize.
App-level optimizations reduce startup work before the first request:
To handle known spikes, pre-warm resources ahead of time because autoscaling alone may not catch up with event velocity. Cloud Load Balancing itself does not require pre-warming.
Exam tip: Pre-warm virtual machines, caches, and serverless components to prevent cold starts before peak traffic, while Cloud Load Balancing does not require pre-warming.
Secure integration connects serverless workloads to private resources without internet exposure while using events and identities to decouple components. Private connectivity uses a Serverless VPC Access connector that bridges the serverless environment to the VPC network, so requests flow from Cloud Run through the connector into the subnet and responses return the same way. Shared VPC centralizes network policy in a host project while workloads run in a service project. Ingress controls restrict Cloud Run to accept only from an external Application Load Balancer, Cloud Armor filters denial-of-service and web attacks, VPC firewall rules limit egress to TCP 443 to restricted.googleapis.com, and VPC Service Controls places services in a perimeter for data isolation.
Asynchronous orchestration with Eventarc and Pub/Sub decouples producers from consumers through queued delivery. Eventarc routes and encrypts events, Pub/Sub queues them and delivers triggers to Cloud Run functions, and functions deployed with internal-only addresses are reached only through triggers and reach private resources only through the VPC connector. A storage-driven flow moves in order: first Cloud Storage, Scheduler, or BigQuery emits an event, then Eventarc routes it toward Pub/Sub, then Pub/Sub delivers it to the function, then the function flows through the connector to Cloud SQL or internal servers. Least-privilege Identity and Access Management splits roles so run, connector, and image-pull identities each hold only needed permissions, with secrets in Secret Manager mounted as volumes and images in Artifact Registry protected by customer-managed keys rotated every 30 days.
Continue with this study guide: Serverless computing
A sequence showing traffic surge triggering Metrics Server, then HPA adding Pod replicas, then Scheduler leaving Pods Pending, then Cluster Autoscaler adding nodes so Pods can schedule.
Use Compute Engine for workloads needing full operating system control, Google Kubernetes Engine (GKE) for containerized workloads needing orchestration across many services, and Cloud Run for request- or event-driven workloads that should scale automatically. Compute Engine lets you manage the guest operating system, machine type, disks and accelerators including GPUs or TPUs, while Cloud Run requires only a container image and request logic with no servers or clusters to manage.
Standard VMs use standard on-demand rates while in use, run until stopped or deleted, and support live migration and automatic restart. Spot VMs provide the same machine types, options and performance while running at discounts of up to 91% on vCPUs, memory, GPUs and Local SSD disks, but they offer only best-effort availability with no Service Level Agreement (SLA) and are stopped by default or deleted at any time to reclaim zone capacity.
Virtual Private Cloud (VPC) firewall rules filter traffic at the Google Kubernetes Engine (GKE) node level, while Kubernetes NetworkPolicy filters traffic at the Pod level. VPC firewall rules protect nodes at Layer 3 or Layer 4 and NetworkPolicy protects Pods at Layer 3 or Layer 4, so both are needed together for defense in depth and a node rule should never be assumed to provide Pod-to-Pod isolation.
The Horizontal Pod Autoscaler changes the number of Pod replicas in response to current load above or below target, the Vertical Pod Autoscaler changes CPU and memory requests per Pod based on historical usage, and the Cluster Autoscaler changes the number of nodes in node pools based on Pending Pods or underutilized nodes. In a surge the Horizontal Pod Autoscaler first increases replicas, then the scheduler attempts placement, and only after Pods remain Pending does the Cluster Autoscaler add nodes.
Last updated