-
k3d cluster create wasm-cluster --image ghcr.io/deislabs/containerd-wasm-shims/examples/k3d:v0.9.0 -p "8081:80@loadbalancer" --agents 2
-
kubectl apply -f https://github.com/deislabs/containerd-wasm-shims/raw/main/deployments/workloads/runtime.yaml
-
kubectl apply -f https://github.com/deislabs/containerd-wasm-shims/raw/main/deployments/workloads/workload.yaml
-
Wait ~15 seconds for resources to be Ready
-
curl -v http://127.0.0.1:8081/spin/hello
-
Install Istio:
istioctl install --set profile=default --skip-confirmation
-
Install Prometheus with:
kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.19/samples/addons/prometheus.yaml
- Note: this is a demo prometheus install, not for production use
-
Install Kiali:
helm install --namespace istio-system --set auth.strategy="anonymous" --repo https://kiali.org/helm-charts kiali-server kiali-server
-
Label the default namespace with
istio-injection=enabled
:kubectl label namespace default istio-injection=enabled
-
Deploy WASM application YAML in this repo:
kubectl apply -f ./product-api.yaml
- Notice that there are 2 Ready "containers" within the product-api pod. One of them is the Istio sidecar!
-
Deploy the Istio
sleep
sample application:kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.19/samples/sleep/sleep.yaml
-
Start a loop to curl the product-api service from the sleep pod:
while true
do
kubectl exec -it deploy/sleep -- curl http://product-api:5001/v1-get-item-types
sleep 1
done
- In a separate terminal, port-forward the kiali service:
kubectl port-forward svc/kiali 20001:20001 -n istio-system
- View the kiali graph (make sure to stretch out the range to >1min so the graph doesn't reset)