Difficulty: Introduction
Estimated Time: 20 minutes

Kubeless on Kubernetes

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 12

Your Kubernetes Cluster

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

Kubernetes Dashboard

As an administrator, you can control the cluster with the kubectl CLI tool. You can also use the Kubernetes Dashboard. Because the dashboard can be accessed publicly, it is protected and requires the secret access token to sign in. Because you have administration access to this cluster, copy the token from this secret.

export TOKEN=$(kubectl describe secret $(kubectl get secret | awk '/^dashboard-token-/{print $1}') | awk '$1=="token:"{print $2}') && echo -e "\n--- Copy and paste this token for dashboard access --\n$TOKEN\n---"

To access the dashboard, click on the Kubernetes Dashboard tab above the command line or from this link: https://[[HOST_SUBDOMAIN]]-30000-[[KATACODA_HOST]].environments.katacoda.com/. At the sign in prompt select Token and paste in the token, you copied a moment ago.

For Kubernetes clusters exposed to the public, always lock administration access including access to the dashboard.

Terminal
Kubernetes Dashboard
Kubeless UI