A test consists of three sections cluster setup, test setup, and test result.
- Docker
- Kind
- Kubectl
- Helm
# Prerequisites: | |
# - Latest Docker Desktop | |
# - KWasm extension: https://open.docker.com/extensions/marketplace?extensionId=0xe282b0/kwasm-docker-desktop | |
services: | |
app: | |
image: felipecruz/tinygo-key-value:latest | |
command: | |
- / | |
platform: wasi/wasm | |
runtime: io.containerd.spin.v1 |
Run demo app with docker CLI
docker run --platform wasi/wasm --runtime io.containerd.spin.v1 -p 80:8080 -d ghcr.io/deislabs/containerd-wasm-shims/examples/spin-rust-hello:latest /
WARNING: This could cause damage to the VM. WARNING: This could cause damage to the VM. You may need to factory reset Docker Desktop if something goes wrong.
Use containerd for pulling and storing images
Enable Kubernetes
# Currently only AWS AKS cluster with Ubuntu worker nodes are supported by KWasm. | |
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: |
kind create cluster | |
# Takes some time ... | |
# Install KWasm operator | |
helm repo add kwasm http://kwasm.sh/kwasm-operator/ | |
helm install -n kwasm --create-namespace kwasm-operator kwasm/kwasm-operator | |
# Provision Nodes | |
kubectl annotate node --all kwasm.sh/kwasm-node=true | |
# Add runtime class for crun | |
echo 'apiVersion: node.k8s.io/v1 |
doctl kubernetes cluster create kwasm | |
# Takes some time ... | |
doctl kubernetes cluster kubeconfig save kwasm | |
# Install KWasm operator | |
helm repo add kwasm http://kwasm.sh/kwasm-operator/ | |
helm install -n kwasm --create-namespace kwasm-operator kwasm/kwasm-operator | |
# Provision Nodes | |
kubectl annotate node --all kwasm.sh/kwasm-node=true | |
# Jump into step 3 and 4 of containerd-wasm-shims https://github.com/deislabs/containerd-wasm-shims#using-a-shim-in-kubernetes |
0xc447cD78E195af040Ad17A0acF0A7440609677fA |
I hereby claim:
To claim this, I am signing this object: