Skip to content

Instantly share code, notes, and snippets.

@shivaylamba
Last active June 3, 2023 04:42
Show Gist options
  • Save shivaylamba/bd1fcf5fc7cc1cc4eb95da0c620afb5d to your computer and use it in GitHub Desktop.
Save shivaylamba/bd1fcf5fc7cc1cc4eb95da0c620afb5d to your computer and use it in GitHub Desktop.

Revisions

  1. shivaylamba revised this gist Jun 3, 2023. 1 changed file with 21 additions and 3 deletions.
    24 changes: 21 additions & 3 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,26 @@


    # --image ghcr.io/deislabs/containerd-wasm-shims/examples/k3d:v0.5.1: This flag specifies the Docker image to use as the base image for the cluster nodes. In this case, the image ghcr.io/deislabs/containerd-wasm-shims/examples/k3d:v0.5.1 is being used. This image contains the necessary components for running WebAssembly workloads using containerd and k3d.
    # --image ghcr.io/deislabs/containerd-wasm-shims/examples/k3d:v0.5.1: This flag specifies the Docker image to use as the base image for the cluster nodes. In this case, the image ghcr.io/deislabs/containerd-wasm-shims/examples/k3d:v0.5.1 is being used. This image contains the necessary components for running WebAssembly workloads using containerd and k3d.

    # --agents 2: This flag specifies the number of worker nodes or agents to create in the cluster. In this case, it creates two agents to distribute the workload across multiple nodes.
    ```
    k3d cluster create wasm-cluster \
    k3d cluster create wasm-cluster1 \
    --image ghcr.io/deislabs/containerd-wasm-shims/examples/k3d:v0.5.1 \
    -p "8081:80@loadbalancer" --agents 2
    ```
    ```


    kubectl get nodes


    ## Verify the runtime configuration
    ## docker exec -it k3d-wasm-cluster-agent-0 ash
    ## ls /bin | grep containerd-

    - You can see the runc, slight, and spin shims. runc is the default low-level runtime for running containers on Kubernetes and is present on all worker nodes running containerd. spin and slight are Wasm runtimes for running WebAssembly apps on Kubernetes.


    ## kubectl get nodes --show-labels



  2. shivaylamba created this gist Jun 3, 2023.
    8 changes: 8 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@


    # --image ghcr.io/deislabs/containerd-wasm-shims/examples/k3d:v0.5.1: This flag specifies the Docker image to use as the base image for the cluster nodes. In this case, the image ghcr.io/deislabs/containerd-wasm-shims/examples/k3d:v0.5.1 is being used. This image contains the necessary components for running WebAssembly workloads using containerd and k3d.
    ```
    k3d cluster create wasm-cluster \
    --image ghcr.io/deislabs/containerd-wasm-shims/examples/k3d:v0.5.1 \
    -p "8081:80@loadbalancer" --agents 2
    ```