Serverless in the Datacenter: FaaS on K8s at DevNet Create


April 16, 2019 - 1 Comment

If you’ve ever wanted to learn the fundamentals of serverless and get your hands dirty building a LAMP-like application, DevNet Create has a session for you. On both April 24 and April 25 from 11:45a to 12:30p, I’ll be running an exercise entitled “FONK: FaaS on K8s working examples.” During our 45 minutes together, we’ll build a serverless version of the Guestbook application, which is the “Hello World” of the Kubernetes (K8s) community. Only instead of using containers directly the way that the original Guestbook does, we’ll use a Function-as-a-Service (FaaS) runtime, an Object Storage service, and a NoSQL server all running on top of K8s.

F-O-N-K.

What is FaaS on K8s?

Developers need some platform providing them with compute resources in digestible bites when designing applications. Simply put, a Function-as-a-Service (FaaS) runtime (such as AWS Lambda or Azure Functions) is to serverless application architecture as a container runtime is to a microservices architecture. A container runtime takes care of things like autoscaling, rolling updates, and name resolution of different services running within it. A FaaS runtime obscures details of the underlying container runtime that most use under the hood and provide developers with a cleaner experience that enables them to focus on their own business logic.

During the session, we’ll discuss the six most popular FaaS runtimes that run on top of K8s so that you can run serverless applications in your own datacenter instead of in the public cloud. The featured labs will let you get your hands on two of them: OpenFaaS and OpenWhisk.

The Environment We’ll Be Using

I’ll be spending my evening on April 23 using a DevNet Sandbox to set up the following environment for you:

FONK Lab Configuration

Each student will get a K8s cluster pre-configured with not only OpenWhisk and OpenFaaS runtimes but also an Object Storage service via Minio and a NoSQL server via MongoDB. An additional VM will be provided and preloaded with all the command line tools we’ll need to build an application as well. What does a web application look like when using this FONK design pattern?

Our End Goal: The FONK Guestbook

Instead of the traditional K8s Guestbook that uses three services and six persistent containers:

K8s Guestbook

we’ll instead use the FONK design pattern to build its serverless equivalent:

FONK Guestbook

Minio will host our static HTML and Javascript files. Upon being loaded into a browser, the Javascript will make REST API calls to the API gateway provided by our FaaS runtime to launch functions on demand. When loaded into memory as needed, those functions will perform read and write operations from and to our MongoDB. The Javascript will then alter our HTML in the browser to reflect the changes to our user.

See You There!

Any DevNet Create attendee can take part in these sessions and although you might get more out of it if you are already a K8s user, people of any skill level will be able enter the dozen or so command line instructions and participate.  If you’ve never used K8s before, you can get a basic understanding by going through DevNet’s excellent hands-on introduction to Cisco Container Platform, which is our K8s-as-a-Service product that the session will use behind the scenes.

Come see what all the serverless buzz is about, what makes it so different from microservices, and how you could run it all inside your data center leveraging your existing infrastructure. Register now to attend DevNet Create.  I look forward to seeing you there in Mountain View!



In an effort to keep conversations fresh, Cisco Blogs closes comments after 60 days. Please visit the Cisco Blogs hub page for the latest content.

1 Comments

  1. Dear Pete, Thank you for this article.