Difficulty: Introduction
Estimated Time: 30 minutes

Kubeless on Kubernetes

Kubeless

Kubeless is a Kubernetes-native serverless framework that lets you deploy small bits of code without having to worry about the underlying infrastructure plumbing. It leverages Kubernetes resources to provide auto-scaling, API routing, monitoring, troubleshooting and more.

Exploring Kubeless is a great way to explore this as an architectural pattern on Kubernetes. The combination of a CLI tool, ConfigMaps, pre-baked containers, a controller and some Custom Resource Definition (CRDs) optionally along with Kafka achieves a clean solution for managing functions.

Kubeless relies on a command-line tool called 'kubeless' to submit functions and perform controlling operations with the Kubeless controller. There is also a user interface to parallel the CLI tool features. A dedicated Kafka system is also added to allow functions to be trigger via publish/subscribe.

You will learn how:

  • to install Kubeless on Kubernetes
  • functions are deployed and removed
  • functions are named, exposed, and invoked
  • functions are listed, inspected and monitored

More about the Kubeless architecture is described in the Kubeless documentation.

Kubeless is purely open-source and non-affiliated to any commercial organization. Help and feedback is welcomed.

Conclusion

Kubeless is a Kubernetes-native serverless framework. It runs on top of your Kubernetes cluster and allows you to deploy small unit of code without having to build container images. With Kubeless you can build advanced applications that tie together services using functions.

Lessons Learned

With these steps you have learned:

  • how to install Kubeless on Kubernetes,
  • how functions are deployed and removed,
  • how functions are named, exposed, and invoked,
  • how functions are listed, inspected and monitored.

References

Additional topics may be added to this lesson:


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.

Kubeless

Step 1 of 11

Install Kubeless

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

kubectl version && kubectl cluster-info && kubectl get nodes

Verify the Kubernetes cluster is empty.

kubectl get deployments,pods,services

The Helm package manager used for installing applications on Kubernetes is also available.

helm version

Install Kubeless Controller

A common Helm chart is predefined for installing Kubeless. Normally, popular charts appear in the curated Helm chart repository and there are plans to move Kubeless there. For now, this repo add command will allow Helm to find the Kubeless chart:

helm repo add incubator https://kubernetes-charts-incubator.storage.googleapis.com/

To install Kubeless onto Kubernetes apply this command:

helm install --name my-kubeless --namespace kubeless incubator/kubeless --set ui.enabled=true

As part of the installation there will be two Pods started in the new kubeless namespace on your Kubernetes cluster.

  • The Kubeless controller deployment will watch for function objects to be created.
  • The Kubeless ui deployment serves up a browser based dashboard showing the functions

Observe the availability of each deployment as they progress from 0 to 1:

kubectl get deployments,pods --namespace kubeless

New functions can now be deployed to Kubeless.

Terminal
Kubernetes Dashboard
Kubeless UI