© Copyright 2017 Pivotal Software, Inc. All rights Reserved. Version 1.0
Jay Lee(jaylee@pivotal.io)
Advisory Platform Architect
August 2018
Knative and Riff
Function as a Service
Q: What is Knative?
Simpler way for developers to
deploy and run serverless apps and
functions atop Kubernetes and Istio.
DeWitt Clinton, Google Cloud
"Pivotal has been instrumental in the design and
delivery of Knative.
We appreciate this partnership, and are excited that
Pivotal plans on commercializing Knative
components on Kubernetes with their Pivotal
Function Service.”
Q: What does Knative do?
Source-to-container, by plug-ins (e.g. Cloud Foundry,
Dockerfile) - Deploying new (routable) function to
Kubernetes
Scale with Events (0 to 1, 1 to N, N to 0)
Roll out upgrades to functions, or perform a rollback
Trigger functions when called via HTTP requests; in
progress towards supporting gRPC as well
Q: What components are part of Knative?
Serving. It’s a scale-to-zero, request-driven compute runtime which leverages Istio to route
traffic amongst revisions (current versions of apps). The goal of Serving is to provide
Kubernetes extensions for deploying and running serverless workloads.
Build. Provides a pluggable model for building containers from source code. Based on
Google's container builder service. Buildpacks are one style of builds that could be plugged
into this model.
Eventing. Offers a way for apps and functions to consume (and publish) event streams from a
variety of sources. Uses channels (pub/sub destinations for messages), subscriptions
(specifies where messages are dispatched to from channel), and buses (backing provider like
Google Cloud PubSub or Kafka). Encourages an asynchronous, loosely coupled architecture.
Q: What makes up the Serving project?
There are four primary resources: service, configuration, revision, and
route.
Q: What makes up the Serving project?
There are four primary resources: service, configuration, revision, and
route.
DEMO: Knative
Q: What is Riff?
riff is designed for running
Functions in response to Events.
Betting our FaaS future on Knative
Community-driven
ecosystem of
EventSources,
Buses,
Invokers,
BuildTemplates,
etc.
Kubernetes
VALUE LINE
BuildTemplates
Channels
CLI/UI
Invokers
VALUE LINE
DEMO: riff with
Spring Cloud Function
riff
$ riff function create java function-riff --git-repo
https://github.com/eggboy/riff-springcloudfunction.git --artifact
"functio
n-0.0.1-SNAPSHOT.jar" --handler "sayHi" --image eggboy/riff-
function
$ curl -w 'n' -H 'Host: function-riff.default.example.com' -H
'Content-Type: text/plain' http://$SERVICE_IP -d "Jay"
Pivotal Application
Service (PAS)
Pivotal Container
Service (PKS)
Pivotal Function
Service (PFS)
Unit = Container
Running in Multiple Env
Open Source, Non-HTTP
Unit = Application
Web-facing App
Code First, HTTP
Unit = Function
Extending App with Event,
Lightweight ETL
Events, Fully-managed env
Transforming How The World Builds Software
© Copyright 2017 Pivotal Software, Inc. All rights Reserved.

Knative and Riff

  • 1.
    © Copyright 2017Pivotal Software, Inc. All rights Reserved. Version 1.0 Jay Lee(jaylee@pivotal.io) Advisory Platform Architect August 2018 Knative and Riff Function as a Service
  • 2.
    Q: What isKnative? Simpler way for developers to deploy and run serverless apps and functions atop Kubernetes and Istio.
  • 3.
    DeWitt Clinton, GoogleCloud "Pivotal has been instrumental in the design and delivery of Knative. We appreciate this partnership, and are excited that Pivotal plans on commercializing Knative components on Kubernetes with their Pivotal Function Service.”
  • 4.
    Q: What doesKnative do? Source-to-container, by plug-ins (e.g. Cloud Foundry, Dockerfile) - Deploying new (routable) function to Kubernetes Scale with Events (0 to 1, 1 to N, N to 0) Roll out upgrades to functions, or perform a rollback Trigger functions when called via HTTP requests; in progress towards supporting gRPC as well
  • 5.
    Q: What componentsare part of Knative? Serving. It’s a scale-to-zero, request-driven compute runtime which leverages Istio to route traffic amongst revisions (current versions of apps). The goal of Serving is to provide Kubernetes extensions for deploying and running serverless workloads. Build. Provides a pluggable model for building containers from source code. Based on Google's container builder service. Buildpacks are one style of builds that could be plugged into this model. Eventing. Offers a way for apps and functions to consume (and publish) event streams from a variety of sources. Uses channels (pub/sub destinations for messages), subscriptions (specifies where messages are dispatched to from channel), and buses (backing provider like Google Cloud PubSub or Kafka). Encourages an asynchronous, loosely coupled architecture.
  • 6.
    Q: What makesup the Serving project? There are four primary resources: service, configuration, revision, and route.
  • 7.
    Q: What makesup the Serving project? There are four primary resources: service, configuration, revision, and route.
  • 8.
  • 9.
    Q: What isRiff? riff is designed for running Functions in response to Events.
  • 11.
    Betting our FaaSfuture on Knative Community-driven ecosystem of EventSources, Buses, Invokers, BuildTemplates, etc. Kubernetes VALUE LINE BuildTemplates Channels CLI/UI Invokers VALUE LINE
  • 12.
    DEMO: riff with SpringCloud Function
  • 13.
    riff $ riff functioncreate java function-riff --git-repo https://github.com/eggboy/riff-springcloudfunction.git --artifact "functio n-0.0.1-SNAPSHOT.jar" --handler "sayHi" --image eggboy/riff- function $ curl -w 'n' -H 'Host: function-riff.default.example.com' -H 'Content-Type: text/plain' http://$SERVICE_IP -d "Jay"
  • 14.
    Pivotal Application Service (PAS) PivotalContainer Service (PKS) Pivotal Function Service (PFS) Unit = Container Running in Multiple Env Open Source, Non-HTTP Unit = Application Web-facing App Code First, HTTP Unit = Function Extending App with Event, Lightweight ETL Events, Fully-managed env
  • 15.
    Transforming How TheWorld Builds Software © Copyright 2017 Pivotal Software, Inc. All rights Reserved.