Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Cloud Run... tout ce qu'il faut sans K8S @DevQuest

Cloud Run... tout ce qu'il faut sans K8S @DevQuest

https://www.linkedin.com/posts/devquest-niort_programme-matin%C3%A9e-du-vendredi-6-juin-activity-7330502602964533248-Fmdt

Docker est arrivé en 2016 en France permettant de packager nos applications facilement. Il a fallu maîtriser les concepts de Docker : commandes, isolation, optimisation des layers etc.

Ensuite, la solution leader d'orchestration Kubernetes est arrivée permettant de scaler ces containers. Pour permettre à K8S de gérer correctement un nom de domaine en TLS, livrer de façon transparente en production, faire du test A/B, il faut là encore retrousser les manches.

Basé sur le projet Open Source Knative, Cloud Run est LA solution parfaite pour déployer des conteneurs et permet de gérer tout ça : autoscaling, gestion du traffic et bien d'autres fonctionnalités !

Faisons un tour des petits plus de cette solution : nous y trouvons la majorité des features d'un Kubernetes sans Kubernetes.

Je vous partagerai mon expérience et essaierai de montrer pourquoi les solutions Serverless & Cloud Run sont l'avenir.

Avatar for Julien Landuré

Julien Landuré

June 06, 2025
Tweet

More Decks by Julien Landuré

Other Decks in Programming

Transcript

  1. App Engine One of the first PaaS ❌ Limited runtimes

    Need specific libraries Vendor lock in ✅ Easy deployment Custom domain name Traffic splitting between versions Embed a stateful solution (datastore) Automatic CDN Scaling from 0 to N
  2. Docker Universal package manager ❌ Dockerfile syntax Installation of Docker

    & CLI Daemon opts & linux concepts Security ✅ Open Source Reproductible & ephemeral concepts Work with any runtime Start containers quickly Very Popular: many images & cloud services available
  3. 2017: AKS & EKS 2016: Kubernetes adoption by CNCF 2015:

    GKE 2014: Kubernetes 2013: Docker 2008: LXC 2007: cgroups
  4. ✅ Popular: well documented Supported by all cloud providers Made

    to solve scaling issues Pet vs Cattle Desired State vs Actual State Open Source healthy Kubernetes Container orchestration at scale ❌ New concepts: pod, service, deployment etc. Yaml syntax New tooling (helm, kustomize)
  5. Kubernetes… again Container orchestration at scale ✅ Autoscaling Automated rollouts

    & rollbacks Health checking Load Balancing 🎓 Upgrade components Stateful objects Security IAM Pricing
  6. Kubernetes… tooling and more Container orchestration at scale 🚧 Node

    scaling with GKE / Hidden control plane with Autopilot Custom domain & traffic splitting with Traefik Service Mesh with Istio Scale from 0 with Knative or KEDA Runtime security with Falco / Network with Cilium FinOps with Karpenter Audit with Kyverno & many CNCF available operators + products…
  7. Cloud Run One of the first serverless container solution HTTP

    only (gRPC) Container contract - Listen on 0.0.0.0 - HTTP server must start < 4 min - Request time < 60 min - Stateless Pricing Model Easy deployment Custom domain name Traffic splitting between versions Portability of containers Buildpacks available Scaling from 0 to N No vendor lock in with Knative
  8. Serverless computing refers to the concept of building and running

    applications that do not require server management. It describes a finer-grained deployment model where applications, bundled as one or more functions, are uploaded to a platform and then executed, scaled, and billed in response to the exact demand needed at the moment. Serverless definition https://github.com/cncf/wg-serverless/tree/master/whitepapers/serverless-overview
  9. Virtual Machine OS Application Runtime Application Virtual Hardware Dedicated Server

    OS Application Runtime Application Virtual Hardware Containers OS Application Runtime Application Virtual Hardware Functions Functions Functions Application Platform OS Application Runtime Application Virtual Hardware Functions Serverless OS Application Runtime Application Virtual Hardware Functions Infrastructure Container Platform Function Compute Engine Kubernetes Engine App Engine Cloud Functions On-Premises Serverless Zone Physical Hardware Cloud Run
  10. Containers Any language Any library Any binary Ecosystem of base

    images .js .rb .go .py .sh … 0 1 0 1 0 0 1 1 1
  11. Cloud Run Fully managed, deploy your workloads and don’t see

    the cluster. Cloud Run on GKE Deploy into GKE, run serverless side-by-side with your existing workloads. Knative Everywhere Use the same APIs and tooling anywhere you run Kubernetes with Knative. Serverless containers with Knative & Cloud Run
  12. Container contract Listen on 0.0.0.0 on port $PORT (default 8080)

    HTTP server must start < 4 min (timeout → 504) Request time < 60 min (default → 5 min) Stateless (in-memory file system, doesn’t persist) Computation only within request (No background activity)
  13. Container resources 1 vCPU per container instance (configurable to 8

    vCPU) 512 MiB of memory up to a max of 32 GiB (configurable) 80 concurrent requests per container (configurable 1-1000) 1000 max containers by default (configurable 1-1000) Access to a Metadata Server Sandboxed by gVisor
  14. Classic Cloud Run workflow 1 2 3 Write your code

    Build and package Deploy to Cloud Run Container image (from Artifact Registry) Application Listen on a port and accept requests Web app Source code
  15. Source-based Workflow 1 Write your code 2 Deploy to Cloud

    Run using Buildpacks Source code Container image Buildpacks Web app
  16. Latest news on Cloud Run VPC support and private access

    Secret management & IAP CPU Boost to avoid cold starts Multi-regional deployments Cloud Storage mounts
  17. Quick recap ✅ Stateless HTTP request-response workloads Scale: way up,

    down to zero, bursty Any runtime: any language, any dependencies, etc ❌ Must use containers
  18. • Cloud Run covers the majority of app use cases

    • One of the TOP project Google Cloud • Replacement of my beloved App Engine • Interoperable (supported by Knative/eventing) • Superior Dev Experience (local emulator & buildpacks) • Support AI (GPU) & Enhanced by AI (MCP Server) https://github.com/GoogleCloudPlatform/cloud-run-mcp My point of view
  19. Serverless GPU ❌ Limited to NVIDIA L4 GPUs Up to

    4 GPUs per instance Min of 4 CPUs and 16Gib RAM 💸 Max instances depending of your GPU quotas ✅ Pay-per-second billing Scale to zero Rapid startup and scaling (5s) Full streaming support Support any model
  20. • 👍 Kubernetes and Serverless can support each other •

    😱 Serverless Container x Serverless GPU solutions are the future Release of AWS App Runner & Azure Container Instance • 💪 The right tool to do the right thing (Serverless GPU) • 💊 Find your way: more a Dev (Serverless World) or an Admin (K8S World) To sum up