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

WebAssembly beyond the Browser

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.

Thorsten Hans

November 25, 2021
Tweet

More Decks by Thorsten Hans

Other Decks in Technology

Transcript

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

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

    get it • Running WebAssembly workloads in Kubernetes • Conclusion Talking Points - What we will cover today
  3. • 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
  4. • 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
  5. • Introduction • What is krustlet and how can I

    get it • Running WebAssembly workloads in Kubernetes • Conclusion Talking Points - What we will cover today
  6. • 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
  7. • 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
  8. • 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
  9. Adding krustlet to Kubernetes - Add krustlet to Azure Kubernetes

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

    get it • Running WebAssembly workloads in Kubernetes • Conclusion Talking Points - What we will cover today
  11. • 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
  12. Adding krustlet to Kubernetes - Running simple Wasm workloads in

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

    get it • Running WebAssembly workloads in Kubernetes • Conclusion Talking Points - What we will cover today
  14. • 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
  15. further questions?!?! Thorsten Hans @ThorstenHans Consultant Don’t be afraid. Shoot

    your question now in person, or later at [email protected] or @ThorstenHans thns.io/slides