Skip to content

Latest commit

 

History

History
160 lines (132 loc) · 5.91 KB

index.md

File metadata and controls

160 lines (132 loc) · 5.91 KB

Supported Kubernetes Distributions

support matrix

KWasm Operator Quickstart

      <li class="active">
          <a href="#">kind </a>
      </li>
    
      <li>
          <a href="#">MiniKube </a>
      </li>
    
      <li>
          <a href="#">MicroK8s </a>
      </li>
    
      <li>
          <a href="#">Azure AKS </a>
      </li>
    
      <li>
          <a href="#">DO Kubernetes </a>
      </li>
    
      <li>
          <a href="#">GCP GKE </a>
      </li>
    
      <li>
          <a href="#">AWS EKS </a>
      </li>
    
      <li class="active">
    
    kind create cluster
    
      <li>
    
    minikube start --container-runtime='containerd'
    
      <li>
    
    microk8s install
    microk8s status --wait-ready
    
      <li>
    
    az group create --name kwasm --location eastus
    az aks create \
        --resource-group kwasm \
        --name kwasm \
        --node-count 2 \
        --generate-ssh-keys
    

    Or follow the official tutorial: tutorial-kubernetes-deploy-cluster

      <li>
    
    doctl kubernetes cluster create kwasm
    
      <li>
    
      <li>
    
    eksctl create cluster --name wasm-eks --node-type=t3.medium --without-nodegroup --version=1.23
    

    # ATENTION, you need to choose the right region and ami # Look up the appropriate ami for your region: https://cloud-images.ubuntu.com/locator/ec2/ echo 'apiVersion: eksctl.io/v1alpha5 kind: ClusterConfig metadata: name: wasm-eks region: us-west-2 managedNodeGroups:

    • name: ng-wasm-eks ami: ami-0809c110f957a5eb8 instanceType: t3.medium minSize: 1 maxSize: 2 overrideBootstrapCommand: | #!/bin/bash /etc/eks/bootstrap.sh wasm-eks --container-runtime containerd' | eksctl create nodegroup -f -
# Add HELM repository if not already done
helm repo add kwasm http://kwasm.sh/kwasm-operator/
# Install KWasm operator
helm install -n kwasm --create-namespace kwasm-operator kwasm/kwasm-operator
# Provision Nodes
kubectl annotate node --all kwasm.sh/kwasm-node=true
      <li class="active">
          <a href="#">WasmEdge </a>
      </li>
    
      <li>
          <a href="#">Spin </a>
      </li>
    
      <li class="active">
    
    kubectl apply -f https://raw.githubusercontent.com/KWasm/kwasm-node-installer/main/example/test-job.yaml
    kubectl logs job/wasm-test
    
      <li>
    

    After installing KWasm, start with step 3 of containerd-wasm-shims using-a-shim-in-kubernetes

    echo '  apiVersion: node.k8s.io/v1                                           
      kind: RuntimeClass
      metadata:
        name: wasmtime-spin
      handler: spin' | kubectl apply -f -
    

    echo ' apiVersion: apps/v1
    kind: Deployment metadata: name: wasm-spin spec: replicas: 1 selector: matchLabels: app: wasm-spin template: metadata: labels: app: wasm-spin spec: runtimeClassName: wasmtime-spin containers: - name: spin-hello image: ghcr.io/deislabs/containerd-wasm-shims/examples/spin-rust-hello:latest command: ["/"] '
    | kubectl apply -f -

    # Finally test the hello spin app 🥳 kubectl port-forward deployment/wasm-spin 8000:80& curl localhost:8000/hello