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

Serverless Architectures and Services on your K...

Avatar for Theo Pack Theo Pack
February 08, 2019

Serverless Architectures and Services on your Kubernetes Cluster

Avatar for Theo Pack

Theo Pack

February 08, 2019

Other Decks in Technology

Transcript

  1. Agenda 01. What Is Serverless? 02. Kubeless 03. Knative 04.

    Virutal Kubelet 05. Recap Serverless Architectures and Services on your Kubernetes Cluster 3
  2. 5 Serverless Architectures and Services on your Kubernetes Cluster What

    is Serverless? Serverless From the first programming languages, to object-oriented programming, to the development of virtualization and cloud infrastructure, the history of computer science is a history of the development of abstractions that hide complexity and empower your to build ever more sophisticated applications. - Kelsey Hightower, Kubernetes: Up and Running
  3. 6 Serverless Architectures and Services on your Kubernetes Cluster What

    is Serverless? Serverless The phrase “serverless” doesn’t mean servers are no longer involved. It simply means that developers no longer have to think "that much" about them. Computing resources get used as services without having to manage around physical capacities or limits. - Ken Fromm, https://readwrite.com/2012/10/15/why-the-future-of-software-and-apps-is- serverless/
  4. 7 Serverless Architectures and Services on your Kubernetes Cluster What

    is Serverless? Serverless Serverless architecture is an approach that replaces long-running virtual machines with ephemeral compute power that comes into existence on request and disappears immediately after use. - ThoughtWorks Tech Radar
  5. 8 Serverless Architectures and Services on your Kubernetes Cluster What

    is Serverless? § No management of servers § Self auto-scale § Scale to zero if nobody is using it - no costs (except for data storage) § Event-Driven § Implicit high availability § Thinking in more abstract capacity units Serverless
  6. 9 Serverless Architectures and Services on your Kubernetes Cluster Examples

    of Serverless Services § FaaS § AWS Lambda § Google Cloud Functions § Azure Functions § Other § App Engine § Firebase § S3 § API Gateway § DynamoDB § Azure Cosmos DB Serverless
  7. 10 Serverless Architectures and Services on your Kubernetes Cluster What

    is Serverless? Serverless - https://twitter.com/kelseyhightower/status/856272003963039744?lang=en
  8. 11 Serverless Architectures and Services on your Kubernetes Cluster Serverless

    on Kubernetes § Serverless experience for the developers § Someone still needs to manage the K8S cluster Serverless ! " Infrastructure Team Developer Team Provides Serverless Services Uses Serverless Services „Kubernetes, just run my code“ - Alexis Richardson – CEO Weaveworks
  9. 12 Serverless Architectures and Services on your Kubernetes Cluster Why

    would you want Serverless on Kubernetes? § Your company doesn't use cloud (or wants vendor lock-in) § Need control over the infrastructure, machines, host OS, ... § Kubernetes offers good abstractions to build upon Serverless
  10. 13 Serverless Architectures and Services on your Kubernetes Cluster CNCF

    Serverless Landscape Serverless Source: https://github.com/cncf/landscape
  11. 14 Serverless Architectures and Services on your Kubernetes Cluster Kubeless

    § Open Source § Go § Inspired by AWS Lambda § Function-based packaging into the container § Runtime § Nodejs § Java § Ruby § PHP § Go § .NET Core (C#) § Ballerina § Custom Kubeless
  12. 15 Serverless Architectures and Services on your Kubernetes Cluster How

    Kubeless works? Kubeless ! Developer Team Function Runtime Container Deployment Configmap Kubeless Controller Service Ingress CRD API Server
  13. 21 Serverless Architectures and Services on your Kubernetes Cluster Knative

    § Open Source § Go § An abstraction on top of Kubernetes § Based on Docker containers § Knative is built on top of Kubernetes and Istio § Set of building blocks to construct your own FaaS/PaaS Knative
  14. 22 Serverless Architectures and Services on your Kubernetes Cluster Users

    § Developers – Use to deploy stuff § Operators – Use as abstraction layer between devs and Kubernetes § Platform Architects – Build your own serverless platform Knative Kubernetes Knative FaaS platform ! Developers
  15. 23 Serverless Architectures and Services on your Kubernetes Cluster DIY

    FaaS on Kubernetes § Knative Serving § Knative Build § Knative Eventing Knative
  16. 24 Serverless Architectures and Services on your Kubernetes Cluster Knative

    Serving § Revisions § Traffic Splitting § Autoscaling § Integrates into service mesh automatically § Holds requests if app scaled to zero § Pluggable § Custom logging and montoring § Custom auto-scaler Knative
  17. 25 Serverless Architectures and Services on your Kubernetes Cluster Knative

    Serving § Service: Create route and configuration § Configurations: Mutable desired state for deployment § Revisions: Immutable snaphot of code and configuration § Routes: Ingress configuration Knative Service Route Configuration Revision Revision Revision manages routes traffic to records history of
  18. 26 Serverless Architectures and Services on your Kubernetes Cluster Knative

    Build § Build pipelines can consist of multiple steps § Each build step is a container image § Builds run inside the containers on the cluster Knative
  19. 27 Serverless Architectures and Services on your Kubernetes Cluster Knative

    Eventing § Eventing services are loosely coupled § Event producers and event sources are independent § Cross-service interoperability - CloudEvent specification based events Knative Source Channel Service Subscription Service Subscription GCP Pub/Sub GitHub AWS SQS Kubernetes . . .
  20. 28 Serverless Architectures and Services on your Kubernetes Cluster HTTP

    Demo Knative Container Knative Kubernetes cURL
  21. 32 Serverless Architectures and Services on your Kubernetes Cluster Kubernetes

    Event Demo Knative Container Knative Kubernetes Kubernetes Event
  22. 37 Serverless Architectures and Services on your Kubernetes Cluster GCP

    PubSub Demo Knative Container Knative Kubernetes Pub/Sub Event
  23. 41 Serverless Architectures and Services on your Kubernetes Cluster Virtual

    Kubelet § Open Source § Version 0.8.0 § Go § Providers § Alibaba Cloud ECI Provider § Azure Container Instances Provider § Azure Batch GPU Provider § AWS Fargate Provider § Hyper.sh Provider § Service Fabric Mesh Provider § HashiCorp Nomad § Custom Virtual Kubelet
  24. 42 Serverless Architectures and Services on your Kubernetes Cluster Kubelet

    Virtual Kubelet The kubelet works in terms of a PodSpec. A PodSpec is a YAML or JSON object that describes a pod. The kubelet takes a set of PodSpecs that are provided through various mechanisms (primarily through the apiserver) and ensures that the containers described in those PodSpecs are running and healthy. - https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/
  25. 43 Serverless Architectures and Services on your Kubernetes Cluster Virtual

    Kubelet Virtual Kubelet Source: https://github.com/virtual-kubelet/virtual-kubelet
  26. 44 Serverless Architectures and Services on your Kubernetes Cluster AWS

    Fargate Demo Virtual Kubelet Master Node Node Node Virtual Kubelet Fargate Container Container
  27. 47 Serverless Architectures and Services on your Kubernetes Cluster Recap

    § Serverless != FaaS § Serverless -> Do not care about underlying infrastructure § FaaS on Kubernetes -> Kubeless, OpenFaaS, … § DIY Serverless platform -> Knative § Existing building blocks § Extend Kubernetes capabilities with Virutal Kubelet