Knative is a framework running on top of Kubernetes that makes it easier to perform common tasks such as scaling up and down, routing traffic, canary deployments, etc. According to the Knative web site it is "abstracting away the complex details and enabling developers to focus on what matters. It solves the 'boring but difficult' parts of deploying and managing cloud native services so you don't have to."
How is the experience of deploying an application on Kubernetes versus Knative?
It is an additional layer installed on top of Kubernetes.
It has two distinct components, originally it were three. The third was called Knative Build, it is now a project of its own: Tekton.
- Knative Serving is responsible for deploying and running containers, also networking and auto-scaling. Auto-scaling allows scale to zero and is probably the main reason why Knative is referred to as Serverless platform.
- Knative Eventing allows to connect Knative services (deployed by Knative Serving) or other Kubernetes deployments with events or streams of events.
This workshop will focus on Knative Serving and will cover the following topics:
- Prerequisites (access to a Kubernetes cluster, work environment, etc.)
- Installing Knative
- Deploying an example app as Knative Service
- Creating a Knative Revision
- Traffic Management
- Auto-Scaling
- Debugging Tips
There are two distinct workshop tracks. Your workshop instructor will tell you which one to follow.
Track 1: Kubernetes | Track 2: Openshift |
---|---|
Knative on IBM Cloud Kubernetes Service (IKS) | OpenShift Serverless on Red Hat OpenShift on IBM Cloud |
To complete this workshop, basic understanding of Kubernetes/OpenShift and application deployment on Kubernetes is instrumental!
You can find detailed information and learn more about Knative here:
- Knative documentation
- Red Hat Knative Tutorial
- Deploying serverless apps with Knative (IBM Cloud Documentation)
- A series of blogs on Knative:
- Serverless and Knative – Part 1: Installing Knative on CodeReady Containers
- Serverless and Knative – Part 2: Knative Serving
- Serverless and Knative – Part 3: Knative Eventing
- Knative Example: Deploying a Microservices Application -- The YAML files for this example are in the
code/cloud-native-starter
directory
There is an Instructor Readme, too.
In this workshop we will be using the IBM Cloud Shell which has all required tools installed.
Should you prefer to run the workshop completely off your own workstation you need the following tools (depending on the track you select):
Tool | Source |
---|---|
git CLI | https://git-scm.com/downloads |
ibmcloud CLI | https://cloud.ibm.com/docs/cli?opic=cli-install-ibmcloud-cli |
ibmcloud plugin | https://cloud.ibm.com/docs/cli?topic=cli-plug-ins -- Install kubernetes-service plugin |
oc | Download from OpenShift Web Console, click on question mark |
kn | https://knative.dev/docs/install/install-kn/ |
hey | HTTP Load generator: https://github.com/rakyll/hey |