Share
Embed
Knative & Serverless.com - Cloud Native Italy 2020
Used during the Developer Experience Office Hours: Serverless Scenarios at https://youtu.be/B3fliO9qa1E
Red Hat Livestreaming
February 09, 2021
Transcript
26 slides
-
Knative & Serverless.com Bring your Functions at ease to the
power of Kubernetes $ kn faas list Brian Tannous Developer Advocate at Red Hat Natale Vinto Developer Advocate at Red Hat -
About us Natale Vinto Natale is a Developer Advocate for
OpenShift at Red Hat, helping people within communities and customers achieve success with their Kubernetes and Cloud Native strategy. @natalevinto #cloudnativeitaly #serverless #kubernetes #openshift -
About us Brian Tannous Brian is a Developer Advocate at
Red Hat, enabling developers and operators to maximize their use of OpenShift and Kubernetes. I have interests in all things Cloud Native and currently focus on OpenShift and Kubernetes. While I enjoy all things OpenShift, I am a Platform Services specialist focused on the tools and services within OpenShift that help make the use of Kubernetes simpler and more robust. My latest special focus is Serverless or Knative and Service Mesh or Istio, Envoy, Jaeger, Kiali. @briantannous #cloudnativeitaly #serverless #service-mesh#kubernetes #openshift -
Agenda • What’s Serverless? • Why Serverless • Serverless Architectures
• Knative • Knative Serving & Eventing • Knative Components: Serverless.com • Demo -
What’s Serverless? “Serverless computing refers to the concept of building
and running applications that do not require server management. It describes a finer-grained deployment model where applications, bundled as one or more functions, are uploaded to a platform and then executed, scaled, and billed in response to the exact demand needed at the moment.” CNCF Serverless Whitepaper 1.0 -
What’s Serverless? Event Your Application Results trigger produce HTTP Requests
Kafka Messages Image Uploaded New Order Login from user -
What’s Serverless? A serverless web application Container HTTP Request Container
HTTP Request Database Browser Browser myapp.example.com -
What’s Serverless? A serverless web application Container HTTP Request Container
HTTP Request Database Browser Browser myapp.example.com Benefits of this model: • No need to setup auto-scaling and load balancers ◦ Scale down and save resources when needed. ◦ Scale up to meet the demand. • No tickets to configure SSL for applications • Enable Event Driven Architectures (EDA) patterns • Enable teams to associate cost with IT • Modernize existing applications to run as serverless containers -
What’s Serverless? Processing a Kafka message Container Container Storage Kafka
Message Kafka Messages External System External System -
Why Serverless Over provisioning Time in capacity planning IT cost
of idle resources Under provisioning Lost business revenue Poor quality of service More applications Direct line between IT costs & business revenue -
Why Serverless Technology is a utility. The Serverless approach abstracts
complexity delivering on the utility premise. ↓ Extensive Architecture and Design ↓ Management and Provisioning ↓ Capacity Planning Sessions ↓ Monoliths and Application Servers ↑ Simplified approach to Kubernetes ↑ Workloads dynamic scale ↑ Sensible defaults ↑ More experimentation, more granular -
1. https://www.oreilly.com/radar/oreilly-serverless-survey-2019-concerns-what-works-and-what-to-expect/ 2. Forrester - Now Tech: Serverless, Q4 2019
40% of enterprises adopted Serverless technologies or practices with expected growth coming in the next 12 to 18 months.¹ 60% of the serverless practitioners reported "reduction of operational costs” with the second biggest benefit being "scale with demand automatically" Vendor lock-in is the second biggest concern when adopting Serverless technologies.¹ Serverless Market Trend -
Serverless the Open source way! • Kubernetes is the de
facto standard for container orchestration • Kubernetes modularity enable plugin and components to extend its capabilities • Kubernetes Serverless is Knative -
Knative Knative extends Kubernetes to provide a set of middleware
components that are essential to build modern, source-centric, and container-based applications that can run anywhere: on premises, in the cloud, or even in a third-party data center. -
Knative Components Knative consists of the Serving and Eventing components:
• Serving - Request-driven compute that can scale to zero • Eventing - Management and delivery of events -
Knative Serving An event-driven model that serves the container with
your application and can scale to zero • Configurations represent the ‘floating HEAD’ of a history of Revisions • Revisions represent immutable snapshot of code and configuration • Routes configure ingress over a collection of Revisions and/or Configurations • Services (nope, not K8s services) are top-level controllers that manage a set of Routes and Configurations to implement a network service -
Knative CLI: kn $ kn service create myService --image=[registry/mycontainer:v1] --min-scale=1
--max-scale=100 $ kn service update myService --traffic myService-rev1=50,myService-rev2=50 $ kn source cronjob create my-cron --schedule "* * * * */1" --data "ping" --sink svc:myService -
Knative Serving kn service kn service create kn service delete
kn service describe kn service list kn service update Configuration Revision 1 Revision 2 Revision 3 Application (Knative Service) Routes Directs traffic Traffic splitting kn revision kn revision delete kn revision describe kn revision list kn route kn route describe kn route list -
Knative Eventing Address a common need for cloud native development
and provides composable primitives to enable late-binding event sources and event consumers. -
Knative Eventing kn service kn service create kn service delete
kn service describe kn service list kn service update Configuration Revision 1 Revision 2 Revision 3 Application (Knative Service) Routes Directs traffic Traffic splitting kn revision kn revision delete kn revision describe kn revision list kn route kn route describe kn route list Event Source Event Providers kn source kn source create kn source list kn source list-types Event -
Serverless.com & Knative • The Serverless Framework is a free
and open-source web framework written using Node.js • Originally used to deploy AWS Lamba functions, it can now deployed to other function as a service provider as Knative -
Serverless.com Components • It can deploy and manage containerized applications
on serverless Knative infrastructure easily • Deploy applications written in any programming language • The Kubernetes mode will use Kaniko for building a container image from your source code and user Docker Hub as a registry for handing over the container image to Knative -
Demo time! • Minikube+OLM • Knative Serving • Serverless.com Knative
component • Eclipse Che • NodeJS function • Link to the Demo -
What’s next? • Knative FaaS • More integrations • More
Serverless! Learn Knative: • Knative.dev • Knative Tutorial • Knative Cookbook