k8s
Hello World
Run a Hello World WASM task via the Kubernetes operator
This runs the Hello World WASM module through the Propeller Kubernetes operator.
Prerequisites
The operator must be deployed and a Proplet registered. Follow the end-to-end example first.
Build the WASM Module
cd propeller
make hello-worldApply the Task
WASM_B64=$(base64 -w0 propeller/build/hello-world.wasm)
kubectl apply -n propeller-workloads -f - <<EOF
apiVersion: propeller.propeller.absmach.eu/v1
kind: Task
metadata:
name: hello-world-example
spec:
name: hello-world-example
functionName: main
file: "${WASM_B64}"
propletSelector:
propletId: "k8s-proplet"
EOFWatch and Verify
kubectl get task hello-world-example -n propeller-workloads \
-o jsonpath='{.status.results}'Expected result: Hello World!
Reference
| Field | Value |
|---|---|
functionName | main |
inputs | none |
daemon | false |
| Proplet env | none required |