Skip to content

Commit

Permalink
Update knative instructions (#220)
Browse files Browse the repository at this point in the history
Signed-off-by: dievskiy <[email protected]>
  • Loading branch information
dievskiy authored Apr 3, 2024
1 parent 76e788c commit 8a5a312
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/develop/deploy/kubernetes/knative.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ $ sudo apt-mark hold kubelet kubeadm kubectl
# create kubernetes cluster
$ swapoff -a
$ kubeadm init --pod-network-cidr=10.244.0.0/16 --cri-socket unix:///var/run/containerd/containerd.sock
$ export KUBECONFIG=/etc/kubernetes/admin.conf

# install cni
$ kubectl apply -f https://raw.githubusercontent.com/flannel-io/flannel/master/Documentation/kube-flannel.yml

# untaint master node
$ kubectl taint nodes --all node-role.kubernetes.io/control-plane-
$ export KUBECONFIG=/etc/kubernetes/admin.conf

# add crun runtimeClass
$ cat > runtime.yaml <<EOF
Expand All @@ -107,7 +107,7 @@ metadata:
name: crun
handler: crun
EOF
$ kubectl apply runtime.yaml
$ kubectl apply -f runtime.yaml

# Verify if the configuration works
$ kubectl run -it --rm --restart=Never wasi-demo --image=wasmedge/example-wasi:latest --annotations="module.wasm.image/variant=compat-smart" --overrides='{"kind":"Pod", "apiVersion":"v1", "spec": {"hostNetwork": true, "runtimeClassName": "crun"}}' /wasi_example_main.wasm 50000000
Expand Down Expand Up @@ -179,7 +179,7 @@ spec:
port: 1234
EOF

$ kubectl apply http-wasm-serverless.yaml
$ kubectl apply -f http-wasm-serverless.yaml

# wait for a while, and check if the serverless service is available
$ kubectl get ksvc http-wasm
Expand Down

0 comments on commit 8a5a312

Please sign in to comment.