Bird
Raised Fist0
GCPcloud~20 mins

Serverless vs GKE decision in GCP - Practice Questions

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Serverless vs GKE Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Architecture
intermediate
2:00remaining
Choosing Serverless for Event-Driven Workloads

You have a workload that processes user uploads and triggers image resizing automatically. The workload is unpredictable and can spike suddenly. Which option best explains why Serverless (Cloud Functions) is a better choice than GKE for this scenario?

AServerless automatically scales to zero when idle and scales up instantly on demand, reducing cost and management overhead.
BGKE provides automatic scaling to zero and instant startup, making it equally cost-effective for unpredictable workloads.
CServerless requires manual scaling configuration, which is complex for unpredictable workloads.
DGKE is cheaper for unpredictable workloads because it uses fixed resources regardless of demand.
Attempts:
2 left
💡 Hint

Think about how each service handles scaling and cost when there is no traffic.

❓ service_behavior
intermediate
2:00remaining
GKE Pod Behavior on Node Failure

In a GKE cluster, if a node running several pods suddenly fails, what happens to those pods?

AThe pods remain stuck on the failed node until manual intervention restarts them.
BThe pods are automatically rescheduled on other healthy nodes by the Kubernetes control plane.
CThe pods are deleted permanently and cannot be recovered automatically.
DThe pods continue running on the failed node until the node recovers.
Attempts:
2 left
💡 Hint

Consider how Kubernetes manages pod availability and node health.

❓ security
advanced
2:00remaining
Security Implications of Serverless vs GKE

Which security characteristic is a key advantage of using Serverless (Cloud Run or Cloud Functions) compared to managing your own GKE cluster?

AServerless requires manual management of firewall rules and OS updates, increasing security risks.
BGKE automatically patches the OS and container runtimes without user intervention, making it more secure than Serverless.
CServerless abstracts away the underlying infrastructure, reducing the attack surface and responsibility for patching OS and runtime vulnerabilities.
DGKE clusters have no security risks because they run isolated containers.
Attempts:
2 left
💡 Hint

Think about who manages the infrastructure and patching in each service.

✅ Best Practice
advanced
2:00remaining
Cost Optimization Strategy for GKE Clusters

You run a GKE cluster with steady but low traffic. Which strategy best reduces cost without sacrificing availability?

AUse node auto-provisioning with preemptible VMs and set minimum node count to maintain availability.
BKeep a fixed large number of nodes running 24/7 to avoid scaling delays.
CDisable autoscaling and manually add nodes only during peak hours.
DUse only standard VMs with no autoscaling to ensure stability.
Attempts:
2 left
💡 Hint

Consider how to balance cost savings with availability using GKE features.

🧠 Conceptual
expert
2:00remaining
Comparing Cold Start Impact on Serverless and GKE

Which statement best describes the impact of cold starts on Serverless platforms compared to GKE-managed containers?

ACold starts affect GKE and Serverless equally because both use container images.
BGKE containers always have cold start delays because nodes must boot before pods start.
CServerless platforms never have cold starts because they keep all functions warm at all times.
DServerless functions may experience cold start latency when scaling from zero, while GKE containers typically run continuously, avoiding cold starts.
Attempts:
2 left
💡 Hint

Think about how each platform handles scaling from zero instances.

Practice

(1/5)
1. Which option best describes a key benefit of using serverless computing in GCP?
easy
A. No need to manage servers and automatic scaling happens
B. You get full control over the underlying hardware
C. You must manually configure load balancers
D. You need to manage container orchestration

Solution

  1. Step 1: Understand serverless basics

    Serverless means the cloud provider handles server management and scaling automatically.
  2. Step 2: Compare options

    The other options describe manual management or container orchestration, which are not serverless benefits.
  3. Final Answer:

    No need to manage servers and automatic scaling happens -> Option A
  4. Quick Check:

    Serverless = No server management + auto scaling [OK]
Hint: Serverless means no servers to manage, auto scales itself [OK]
Common Mistakes:
  • Confusing serverless with container management
  • Thinking serverless requires manual scaling
  • Assuming serverless means full hardware control
2. Which of the following is the correct way to deploy a containerized app on GKE?
easy
A. Use gcloud run deploy command
B. Use kubectl apply -f deployment.yaml command
C. Use firebase deploy command
D. Use gsutil cp to upload container image

Solution

  1. Step 1: Identify GKE deployment command

    GKE uses Kubernetes commands like kubectl apply to deploy resources from YAML files.
  2. Step 2: Check other commands

    gcloud run deploy is for serverless Cloud Run, firebase deploy is for Firebase apps, and gsutil cp uploads files to storage, not deploy containers.
  3. Final Answer:

    Use kubectl apply -f deployment.yaml command -> Option B
  4. Quick Check:

    GKE deploy = kubectl apply [OK]
Hint: GKE uses kubectl with YAML files to deploy containers [OK]
Common Mistakes:
  • Using Cloud Run commands for GKE
  • Confusing Firebase deploy with container deployment
  • Uploading images with gsutil instead of container registry
3. You have a web app with unpredictable traffic spikes and want minimal management. Which GCP service behavior fits best?
medium
A. Serverless auto-scales instantly with no server management
B. GKE requires manual scaling and cluster management
C. GKE automatically scales without any configuration
D. Serverless requires you to provision VM instances

Solution

  1. Step 1: Analyze traffic and management needs

    Unpredictable spikes need fast scaling and minimal management.
  2. Step 2: Match service behavior

    Serverless auto-scales instantly and requires no server management. GKE needs manual or configured scaling and cluster upkeep.
  3. Final Answer:

    Serverless auto-scales instantly with no server management -> Option A
  4. Quick Check:

    Unpredictable traffic + minimal management = Serverless [OK]
Hint: Unpredictable traffic? Choose serverless for auto scaling [OK]
Common Mistakes:
  • Assuming GKE scales automatically without config
  • Thinking serverless needs VM provisioning
  • Confusing manual and automatic scaling
4. You deployed a container on GKE but it fails to start. Which fix is most likely needed?
medium
A. Enable serverless API in GCP console
B. Increase Cloud Run memory allocation
C. Check and fix container image path in deployment YAML
D. Upload container image to Firebase hosting

Solution

  1. Step 1: Identify cause of container start failure

    Common cause is incorrect container image path or tag in deployment YAML.
  2. Step 2: Evaluate options

    Increasing Cloud Run memory or enabling serverless API does not affect GKE container start. Firebase hosting is unrelated to container images.
  3. Final Answer:

    Check and fix container image path in deployment YAML -> Option C
  4. Quick Check:

    Container start fail? Fix image path in YAML [OK]
Hint: Check container image path in YAML if GKE pod fails [OK]
Common Mistakes:
  • Trying serverless fixes for GKE issues
  • Uploading images to wrong services
  • Ignoring deployment YAML errors
5. Your app needs custom networking, persistent storage, and runs long background jobs. Which GCP choice fits best?
hard
A. Use serverless Cloud Run for easy scaling and no management
B. Use Firebase hosting for backend processing
C. Use App Engine standard environment for background jobs
D. Use GKE for full control over networking and storage

Solution

  1. Step 1: Identify app requirements

    Custom networking, persistent storage, and long background jobs require control and flexibility.
  2. Step 2: Match requirements to GCP services

    GKE offers container orchestration with networking and storage control. Serverless Cloud Run lacks persistent storage and complex networking. App Engine standard has limitations on background jobs. Firebase hosting is for static content.
  3. Final Answer:

    Use GKE for full control over networking and storage -> Option D
  4. Quick Check:

    Custom network + storage + long jobs = GKE [OK]
Hint: Need control and storage? Choose GKE over serverless [OK]
Common Mistakes:
  • Choosing serverless despite storage needs
  • Using App Engine for heavy background jobs
  • Confusing Firebase hosting with backend services
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard