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

Kubernetes, serverless, and you - Knative a year later

Kubernetes, serverless, and you - Knative a year later

Since launching in 2018, the Knative project has gained wide adoption and experienced rapid growth. This presentation will provide an overview of serverless, answer why Knative, and outline the “state of the project” combined with critical learnings from the last year that inform the wider serverless landscape.

Mark Chmarny

May 20, 2019
Tweet

More Decks by Mark Chmarny

Other Decks in Programming

Transcript

  1. Serverless Platforms on Kubernetes 13x Runtimes - Build - Routing

    - Binding - Autoscaling - Observability - Invokers - Sources
  2. July 18 v0.1 Initial release Serving, Build Nov v0.2 Pluggable

    networking, autoscaling, and caching Feb v0.4 Upgradable configs Mounting Secrets GRPC, HTTP/2, WebSockets Jan 19 v0.3 Container resources spec Updated scale-to-zero strategy Cluster-local services Apr v0.5 Expanded Event API GRPC streaming Knative Momentum May v0.6 Serving Beta API Auto-TLS EventType CRD
  3. 20% MoM Participation Growth >50 Companies contributing >4K Pull Requests

    400+ Contributors 9 Working Groups v0.6 Released last week! Knative Community
  4. Long tail of contributors drive community momentum VMware, Huawei, Cisco,

    TriggerMesh, Dropbox, SAP, Microsoft, Schibsted, Apache, Independent, China Mobile NTT, CloudBees, Caicloud, Inovex, Docker, Heureka, CNCF, Liz Rice, Zalando, Douyu.com, Nebula. OpsGenie. Terracotta, Eldarion, Giant Swarm, Heroku, Revolgy, SORINT.lab, Switch, Ticketmaster, Virtustream,, Alipay, Blue Box, Cruise Automation, EPAM Systems, EVRY, Foreningen Kollegienet Odense, Giddyinc, IPB, Manifold.co, Orange, Puppet, Stark & Wayne, Weaveworks, Disney Interactive, Ivx, Mediative, Ministère de l'Agriculture et de l'Alimentation, NatureServe, Samsung SDS. Typeform, Wise2c Knative contributions by company, avg % since launch Source: CNCF knative.teststats.cncf.io 4/2019 Redhat (9%) Google (61%) Pivotal (6%) IBM (4%) All others (20%) Knative Project
  5. Products Google Cloud Run Red Hat OpenShift SAP Kyma Google

    Cloud Run on GKE IBM Cloud Kubernetes Service TriggerMesh Build Serving Kubernetes Platform Primitives Events ... Knative-based products today ...
  6. Knative Serving Benefits • Activates and scales based on request

    (up/down to 0) • Manages code/config revisions • Integrates well with service mesh (request path/services access control) • Supports custom domains and certificate management Pluggable • Connect with other native Cloud services like Cloud Build and Stackdriver • Extend with 3rd party integrations like GitLab and Datadog
  7. # List current revisions in demo namespace (filter on service

    name) kubectl get revisions -n demo -l serving.knative.dev/service=mysrv NAME SERVICE NAME GENERATION READY REASON mysrv-qtz5p mysrv-qtz5p-service 2 True mysrv-vq25k mysrv-vq25k-service 3 True # List routes for specific service kubectl get routes -n demo -l serving.knative.dev/service=mysrv NAME DOMAIN READY REASON mysrv mysrv.demo.knative.tech True # Edit service route to point to specific revision # (status/traffic[n]/revisionName) kubectl edit route mysrv -n demo Knative Revision Revision 1 Revision 2 Revision 3 Configuration Route Service
  8. Knative Eventing Loosely coupled • Use existing event sources available

    or build your own • Pluggable channel implementation (e.g. PubSub. Kafka, In-Memory) Benefits • Orchestrates on/off cluster event sources • Binds declaratively event sources, triggers, and services • Scales from just few events to live streaming pipelines • Uses standard CloudEvents
  9. Name Description Apache Camel Allows to use Apache Camel components

    for pushing events into Knative Apache Kafka Brings Apache Kafka messages into Knative AWS SQS Brings AWS Simple Queue Service messages into Knative Cron Job Uses an in-memory timer to produce events on the specified Cron schedule. GCP PubSub Brings GCP PubSub messages into Knative GitHub Brings GitHub organization/repository events into Knative GitLab Brings GitLab repository events into Knative. GCP Scheduler Google Cloud Scheduler events in Knative when jobs are triggered GCP Storage Brings Google Cloud Storage bucket/object events into Knative Kubernetes Brings Kubernetes cluster/infrastructure events into Knative Full lists: https://github.com/knative/docs/tree/master/docs/eventing/sources Knative Event Sources
  10. Knative Build Benefits • Reproducible builds • Enables source to

    serving URL templates • No cross-compiling toil or need for Docker locally • Cloud caching, elasticity of build resources Loosely coupled • Supports decoupled CI/CD (e.g. Cloud Build or Jenkins X) • Ecosystem for enterprise tooling to manage policy and audit builds
  11. # On-cluster Build (Build Templates, Buildpacks, or github.com/tektoncd/pipeline) kubectl apply

    -f build.yaml # GitOps (Cloud Build or your CI/CD platform like Jenkins X) git commit # on branch triggers build for Test/QA deployment git tag/release # triggers deployment pipeline to active service # Local Build & Deploy docker build/tag/publish # uses Dockerfile Kubectl/knctl deploy --image… # github.com/cppforlife/knctl # ko for quick iteration, no Dockerfile github.com/google/ko ko apply -f config.yaml # golang only Knative Build Options
  12. Docs & Community knative.dev Quick Start bit.ly/cr-gke Source & Samples

    github.com/knative Have questions? knative.slack.com Anything else? @mchmarny