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

WebAssembly beyond the Browser

6848c06ef647ab606c668cc5264c0fc9?s=47 Thorsten Hans
November 25, 2021

WebAssembly beyond the Browser

WebAssembly is the next big thing on the server and in the cloud. By leveraging tools like Krustlet (https://krustlet.dev/), we can get rid of containers in Kubernetes! What does that mean? What can you achieve today, and what is still experimental? And how can you get hands-on right now? Join this talk by Azure MVP and cloud-native enthusiast Thorsten Hans to get those questions answered. It's time to embrace the platform of the future.

6848c06ef647ab606c668cc5264c0fc9?s=128

Thorsten Hans

November 25, 2021
Tweet

Transcript

  1. Wasm workloads in Kubernetes Thorsten Hans @ThorstenHans Consultant Let‘s conquer

    the cloud with WebAssembly and krustlet
  2. Consultant @ Thinktecture #Azure #Kubernetes #CloudNative #Terraform thorsten.hans@thinktecture.com thinktecture.com thorsten-hans.com

    @ThorstenHans Thorsten Hans
  3. • Introduction • What is krustlet and how can I

    get it • Running WebAssembly workloads in Kubernetes • Conclusion Talking Points - What we will cover today
  4. • Introduction • What is krustlet and how can I

    get it • Running WebAssembly workloads in Kubernetes • Conclusion Talking Points - What we will cover today
  5. • WebAssembly can be executed in platforms other than the

    browser • WebAssembly System Interface (WASI) • WASI could become the default platform • which talks safely to the underlying OS (eg. Windows) Introduction
  6. • There are different WASI-complient WebAssembly runtimes • for example

    wasmtime, wasmer • Ok, but why? Why should we consider WebAssembly beyond the browser • Portability • Security Introduction
  7. Portability Introduction https://hacks.mozilla.org/2019/03/standardizing-wasi-a-webassembly-system-interface/

  8. Security Introduction https://hacks.mozilla.org/2019/03/standardizing-wasi-a-webassembly-system-interface/

  9. Security Introduction https://hacks.mozilla.org/2019/03/standardizing-wasi-a-webassembly-system-interface/

  10. Security Introduction https://hacks.mozilla.org/2019/03/standardizing-wasi-a-webassembly-system-interface/

  11. Security Introduction https://hacks.mozilla.org/2019/03/standardizing-wasi-a-webassembly-system-interface/

  12. • Introduction • What is krustlet and how can I

    get it • Running WebAssembly workloads in Kubernetes • Conclusion Talking Points - What we will cover today
  13. • Krustlet is a kubelet written in Rust 🦀 •

    It responds to well-know Kubernetes requests like kubectl logs, kubectl describe, kubectl delete, … • Krustlet communicates with Kubernetes API server using HTTPs and reports status back like a regular kubelet, • Krustlet has so called providers. A provider specifies requirements for underlying Wasm runtime. Krustlet uses wastime by default, but you can choose a different provider such as WasmCloud or CRI What is krustlet
  14. • It’s a binary – which attaches local compute power

    to a Kubernetes cluster • Krustlet can be added to a wide variety of different Kubernetes distributions • Start small with dev environments like minikube or KIND • Grow to full blown Kubernetes distributions like reg. Kubernetes or managed Kubernetes offerings like AKS, EKS, GKS What is krustlet
  15. • Krustlet is developed in the open, mostly by Microsoft

    FTEs • Azure is an early adopter for krustlet • We can add krustlet to Azure Kubernetes Service (AKS) • Azure CLI extension is currently in preview • It brings support for WAGI (WebAssembly Gateway Interface) out of the box Krustlet – Why Azure
  16. Adding krustlet to Kubernetes - Add krustlet to Azure Kubernetes

    Service (AKS) - Verify krustlet nodes in AKS - Or in KIND 😪 Demo
  17. • Introduction • What is krustlet and how can I

    get it • Running WebAssembly workloads in Kubernetes • Conclusion Talking Points - What we will cover today
  18. • Install krustlet with your Kubernetes cluster • krustlet is

    Kubernetes-vendor agnostic • Check https://docs.krustlet.dev/ for detailed installation guidance • Gain access to a container registry (must be OCI distribution spec compliant) • Azure Container Registry is used during this talk • Compile your code against wasm32-wasi • rustup target add wasm32-wasi && cargo build --release --target wasm32-wasi Running WebAssembly workloads in Kubernetes
  19. Adding krustlet to Kubernetes - Running simple Wasm workloads in

    Kubernetes - Running Wasi workloads in Kubernetes Demo
  20. • Introduction • What is krustlet and how can I

    get it • Running WebAssembly workloads in Kubernetes • Conclusion Talking Points - What we will cover today
  21. • Running Wasm workloads in the cloud will allow better

    resource utilization • We don’t need to package applications in containers • Strickt sandboxing (WASI) will enahnce overall platform security and robustness • It’s still a bit early – especially when you’ve no control over krustlet itself Conclusion
  22. further questions?!?! Thorsten Hans @ThorstenHans Consultant Don’t be afraid. Shoot

    your question now in person, or later at thorsten.hans@thinktecture.com or @ThorstenHans thns.io/slides