Deploy a Secure Cloud Run Application with Event Triggers

ADVANCED
180 minutes
5 tasks

In this advanced lab, you will learn how to deploy a secure application using Cloud Run and configure it with Eventarc to respond to specific event triggers. You will ensure that the application manages and triggers events efficiently, implementing API security best practices. The lab will guide you through deploying and managing a new API version in Cloud Endpoints, maintaining backward compatibility while optimizing performance and costs. An important aspect is enhancing application reliability and scalability with Horizontal Pod Autoscaling and implementing containerization best practices on GKE.

Scenario

Acme Corp wants to automate their data processing workflow by deploying a responsive application that handles data processing tasks based on real-time events. The application must securely expose APIs and support at least 5,000 RPS (requests per second) with 99.9% availability. You are tasked with deploying this application on GCP using Cloud Run to handle HTTP(S) traffic and utilizing Eventarc for efficient event routing.

Learning Objectives

  • Deploy a fully managed application on Cloud Run.
  • Configure Eventarc to trigger services based on events.
  • Implement API security using IAM and Secret Manager.
  • Optimize application performance with autoscaling strategies.
  • Ensure backward compatibility by managing API versions.

tasks (5)

task 1: Create and configure a Cloud Run service to handle incoming requests

30 min

task 2: Configure Eventarc to automate event-driven workflows

40 min

task 3: Integrate API security with IAM and Secret Manager

30 min

task 4: Deploy a new API version with Cloud Endpoints

40 min

task 5: Optimize application scalability with GKE and HPA

40 min

Prerequisites

  • Basic understanding of HTTP and REST APIs
  • Experience with containerization and GKE fundamentals
  • Familiarity with IAM roles and permissions in Google Cloud

Skills Tested

Deploying applications from source codeInvoking Cloud Run services using triggersConfiguring event receiversExposing and securing APIs in applicationsDeploying a new API version in Cloud Endpoints considering backward compatibilityDeploying containerized applicationsDefining resource requirements for container workloadsImplementing Kubernetes health checks to increase application availabilityConfiguring the Horizontal Pod Autoscaler for cost optimization