There's too much fragmentation for developers when it comes to deciding the right open source FaaS solution. Bryan Friedman and Brian McClain detail Knative, an open source project from Google, Pivotal, and other industry leaders that provides a set of common tooling on top of Kubernetes to help developers build functions.
2. Cover w/ Image
Agenda
■ What is Knative?
■ Example Application
○ Walkthrough on Knative
○ Demo
■ Project riff
■ Q+A
3. Knative: A platform for developers to
build and run serverless applications
atop Kubernetes
4. Eventing
How your code is
triggered by events
● Apps and functions consume
and publish event streams
● Multiple event sources available
● Encourages asynchronous,
loosely coupled architecture
Build
How your code is built and
packaged as a container
● Pluggable model to build
containers from source code
● Build in-cloud or on-cluster
● Push image to registry
● Templates available
(e.g. Buildpacks)
Serving
How your code receives requests
and scales with them
● Request-driven compute runtime
● Scale-to-zero / scale out per load
● Deploy from container registry
● Multiple revisions of same app
● Route traffic across revisions
DETAILS DETAILS DETAILS
Knative Components
5. Eventing
How your code is
triggered by events
● Apps and functions consume
and publish event streams
● Multiple event sources available
● Encourages asynchronous,
loosely coupled architecture
Serving
How your code receives requests
and scales with them
● Request-driven compute runtime
● Scale-to-zero / scale out per load
● Deploy from container registry
● Multiple revisions of same app
● Route traffic across revisions
DETAILS DETAILS
Knative Components
14. Serving
Flexible scaling and routing to your application.
● Automatically deploy containers and configure routing
● Automatically scale up and down, including scale-to-zero
● Point-in-time snapshots of deployments allows multiple versions of
applications at once
● Easy rollbacks, blue-green deployments, partial load testing,
(percentage-based routing), etc.
17. Pivotal Build Service System
Build and package code on-cluster.
● Builds are run completely within Kubernetes
● Code is pulled from git at build time
● Uses Cloud Native Buildpacks
● Packaged as container images; pushed to a registry of your choice
● Underlying CRDs for Build Service to be open source soon!
20. Eventing
Robust eventing support that abstracts away the messaging layer.
● Easy for developers to consume events - No messaging-specific
code
● Messaging layer is abstracted from the developer and pluggable
for the operator
● Brokers provide a place to send events, Triggers direct them
where to go
● Pluggable, Customizable Event Sources
21. Example Event Sources
Cron Job. Produce events on a specified Cron schedule
GitHub. Events happening in a GitHub repository/organization (commit,
new pull request, etc) trigger your function
Google Cloud Storage. Invokes your function when files are uploaded
or changed in a specified bucket
AWS SQS. Messages on SQS are forwarded to your function
22. Custom Event Sources
Event Sources are pluggable and not tightly bundled to Knative
● Community-developed event sources are installed by applying a
YAML file
● ContainerSource makes it easy to build your own event source
○ Package your event emitter as a container, Knative gives a
URI to POST to
31. Project riff
Integrated Build Service. Bundled with Pivotal’s Build Service to
quickly and securely build container images from source.
riff CLI. Make it easy to quickly deploy to Knative. Removes the need to
manage YAML.
Invokers. Allows developers to focus on their functions, invokers will
handle setting up the webserver and running your code