Difficulty: Introduction
Estimated Time: 20 minutes

Riff on Kubernetes

(This draft tutorial is under construction. Contact me for questions: [email protected], December 8, 2018)

Riff

Riff The riff CLI helps developers build and run functions using Knative. It includes commands to install Knative in a Kubernetes cluster, and for managing functions, services, channels, and subscriptions.

These instructions have been adapted from [Getting started]https://projectriff.io/docs/getting-started/).

There are a set of helpful solutions that allow serverless functions to run:

  • Riff is the command line tool, CLI
  • Knative (pronounced kay-nay-tiv) extends Kubernetes to provide a set of middleware components that are essential to build modern, source-centric, and container-based applications that can run anywhere: on premises, in the cloud, or even in a third-party data center.
  • Istio is a service mesh for Kubernetes
  • Kubernetes is the container management system that targets a variety of cloud and data center resources. An operating system for your data center.

In the following steps you will learn:

  • how to install Riff, Knative and Istio on Kubernetes,
  • how to install and invoke functions from the Riff CLI interface.

More about the Riff, Knative and Istio architecture is described in the Riff documentation.

Conclusion

Riff extends Kubernetes (k8s) by defining custom resource definitions. These are represented in YAML and posted to the k8s API server. You can run riff locally, and anywhere K8s runs. More reading on the Pivitol Blog, Building Functions with riff

Lessons Learned

With these steps you have learned:

  • how to install Riff, Knative and Istio on Kubernetes,
  • how to install and invoke functions from the Riff CLI interface.

References


No Fluff Just Stuff

For a deeper understanding of these topics and more join me, Jonathan Johnson, for a transcendent experience on the No Fluff Just Stuff Software Symposium Tour.

Riff

Step 1 of 5

Install Riff

Install Riff

As you see, your Kubernetes cluster is started. Verify it's ready for your use:

kubectl cluster-info

Riff is a command line interface for running functions on Knative on Kubernetes. Install the command line binary.

curl -Lo riff-linux-amd64.tgz https://github.com/projectriff/riff/releases/download/v0.2.0/riff-linux-amd64.tgz && tar xvzf riff-linux-amd64.tgz && sudo mv riff /usr/local/bin/

Verify Riff is available by checking the version.

riff version

Using the Riff CLI tool too initialize Knative. This will include initialization of the Istio service mesh and telemetry services.

riff system install --node-port

Watch the Pods start.

watch kubectl get pod --all-namespaces

Once started check one more time.

kubectl get pod --all-namespaces