KNative
Table of Contents
Interactive Learning Environment
In this lab, we will examine the Docker CLI and execute our first container.
All of our labs are powered by Katacoda and are located at this Profile.
Background
Event-Driven, sometimes also called serverless or functions as a service, is a computing execution model in which the infrastructure/provider dynamically manages the allocation of machine resources.
- Code is deployed to a CSP or elsewhere
- Instance does not exist until invoked, spins up and scales as required, scales to zero when complete
- Changes IT requirements related to security, administration (patching) and architecture
Currently there are various standards with little interoperability between Cloud Service Provider’s. Common examples include the following:
- IBM OpenWhisk
- AWS Lambda
- Google Cloud Functions
- Azure Functions
Overview
KNative can be used to deploy serverless-style functions, applications, and containers to an auto-scaling runtime on Kubernetes. Additionally it has many other features:
- Deploy multiple versions
- Perform custom tasks on your app’s source code
- Build reusable templates
Serving
How your code recieves requests and scales with them
- Request-driven compute runtime
- Scale-to-zero / scale out per load
- Deploy from container registry
- Multiple revisions of same app
- Route traffic across revisions
Build
How your code is built and packaged as a container
- Pluggable model to build containers from source code
- Build in-cloud or on-cluster
- Push image to registry
- Templates available (buildpacks)
Eventing
How your code is triggered by events and executed
- Apps and functions consume and publish event streams
- Multiple event sources available
- Encourages asynchronous, loosely coupled architecture
Note: Initially serverless, Functions as a service (FaaS) and event-driven architecture referred to a microservice that is run
on public cloud
compute engine only when invoked. Recently, serverless is also being used to describe managed container services (CaaS) and application deployments where the user is not responsible for the compute where/when the container runs (Azure AKS and ACI, AWS EKS and Fargate, Google GKE, Google App Engine, and IBM Kubernetes Service).