O'Reilly logo
live online training icon Live Online training

Kubernetes Serverless with Knative

Burr Sutter

In this session, we are going to explore an open source event-driven lambda style serverless programming model and runtime set of capabilities for Kubernetes called Knative. Knative provides a suite of middleware components & building blocks that enhance developer productivity, enable a "source-to-url" pipeline and event-driven Serverless application architectural pattern. Developers have run their code in application servers for many years. However, the cloud paradigm brought new ways to think and design applications. One example of this change is serverless architecture where event-driven code is executed on an ephemeral Linux container on an as-needed basis. It does not mean that there are no servers involved, but for the developer's perspective, it means that they don't need to worry about those servers so they can more focus on differentiating business logic, often designed as microservices and functions.

What you'll learn-and how you can apply it

In this session, our mission is to get you hands-on quickly with Knative on top of Kubernetes/OpenShift where we focus on the following: - Exploring Serverless application architecture: event-driven apps running in ephemeral containers - Installation of Knative into a Kubernetes cluster - Knative Build - your source code to a runnable container/pod - Knative Serving - pay only for what you use with auto-scale-to-zero - Knative Eventing - input sources based on Cloud Events - Tips & Tricks - exploring clever and cool ways to use Knative on Kubernetes

This training course is for you because...

You are an experienced Kubernetes/Openshift application architect or senior developer interested in understanding the new super powers granted by Knative.

Prerequisites

  • Attendees should have attended the "9 Steps to Awesome with Kubernetes" O'Reilly online training or have significant hands-on experience with Kubernetes/OpenShift, with an understanding of Linux containers, Pods, Deployments, Services, Live & Ready probes, etc.
  • You can review the slides for "9 Steps to Awesome" at bit.ly/9stepsawesome to see if your skills are aligned. The exercises for that course are available on github at https://github.com/burrsutter/9stepsawesome.

Course Set-up

You will need a minikube or minishift (or be the cluster admin for a remote Kubernetes/OpenShift cluster) to install Knative.

Recommended Preparation

Kubernetes Cookbook

Recommended Follow-up

https://www.safaribooksonline.com/library/view/introducing-istio-service/9781491988770/

About your instructor

  • A lifelong developer advocate, community organizer, and technology evangelist, Burr Sutter is a featured speaker at technology events around the globe—from Bangalore to Brussels and Berlin to Beijing (and most parts in between)—he is currently Red Hat’s Director of Developer Experience. A Java Champion since 2005 and former president of the Atlanta Java User Group, Burr founded the DevNexus conference—now the second largest Java event in the U.S.—with the aim of making access to the world’s leading developers affordable to the developer community. When not speaking abroad, Burr is also the passionate creator and orchestrator of highly-interactive live demo keynotes at Red Hat Summit, the company’s premier annual event.

Schedule

The timeframes are only estimates and may vary according to how the class is progressing

Segment 1: Serverless vs Serverfull Length: 15 minutes

  • Instructor will dive into the distinctions between Function-as-a-Service and Serverless well as a core principle of serverless architecture - use of Software-as-a-Service options were applicable.
  • Participants will learn WHY they might add FaaS/serverless frameworks on top of Kubernetes/OpenShift to augment their traditional N-tier or microservices architecture

Segment 2: Kubernetes is Awesome: A Quick Recap Length: 20 minutes

  • Instructor will quickly demonstrate several basic concepts related to Kubernetes basics such as Deployment, Service, Pod as well as Istio DestinationRules and VirtualServices
  • Participants will learn the basics of Kubernetes & Istio to level set

Segment 3: Knative Overview & Setup Length: 20 Minutes

  • Instructor will describe and demonstrate the Knative components on top of a minikube/minishift environment, including deploying a simple Knative service plus modification of the concurrency and scaling configuration settings
  • Participants will learn about the namespaces, CRDs, config maps and other infrastructure components of a Knative environment

Segment 4: Knative Build Length: 25 Minutes

  • Instructor will demonstrate Knative Build - a tool for building reproducible container images, from source, in cluster - no more required 'docker build' from the laptop
  • Participants will learn how to make setup a "build pipeline" for the manufacturing of Java application + Linux container images inside of a Kubernetes cluster, ready to be deployed by the Kubernetes cluster.

Break (10 minutes)

Segment 5: Knative Serving Length: 30 Minutes

  • Instructor will demonstrate Knative's Serving components of Services, Configurations, Revisions and Routes.
  • Participants will learn see "serverless" principles in action where application components can be scaled out from zero to many replicas based on load from HTTP clients and then scale back down to zero pods as a result of no load on the endpoint.

Segment 6: Knative Eventing Length: 30 Minutes

  • Instructor will demonstrate Knative's Eventing framework where non-HTTP triggers can be associated with your code
  • Participants will learn the more advanced techniques for adding another types of input streams to trigger the dynamic scale-out of Knative Services on a Kubernetes/OpenShift cluster

Segment 7: Use Cases, Tips and Techniques Length: 30 Minutes

  • Instructor will demonstrate a variety of practical enterprise use cases for Knative Serverless-focused capabilities such as enterprise integration patterns, batch processing, interacting with databases, etc
  • Participants will learn some practical applications of Knative for a more traditional enterprise architecture.