Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Knative & Serverless.com - Cloud Native Italy 2020

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
Tweet

More Decks by Red Hat Livestreaming

Other Decks in Technology

Transcript

  1. 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
  2. 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
  3. 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
  4. Agenda • What’s Serverless? • Why Serverless • Serverless Architectures

    • Knative • Knative Serving & Eventing • Knative Components: Serverless.com • Demo
  5. 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
  6. What’s Serverless? Event Your Application Results trigger produce HTTP Requests

    Kafka Messages Image Uploaded New Order Login from user
  7. What’s Serverless? A serverless web application Container HTTP Request Container

    HTTP Request Database Browser Browser myapp.example.com
  8. 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
  9. What’s Serverless? Processing a Kafka message Container Container Storage Kafka

    Message Kafka Messages External System External System
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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.
  15. 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
  16. 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
  17. 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
  18. 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
  19. Knative Eventing Address a common need for cloud native development

    and provides composable primitives to enable late-binding event sources and event consumers.
  20. 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
  21. 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
  22. 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
  23. Demo time! • Minikube+OLM • Knative Serving • Serverless.com Knative

    component • Eclipse Che • NodeJS function • Link to the Demo
  24. What’s next? • Knative FaaS • More integrations • More

    Serverless! Learn Knative: • Knative.dev • Knative Tutorial • Knative Cookbook