propeller logo
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-world

Apply 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"
EOF

Watch and Verify

kubectl get task hello-world-example -n propeller-workloads \
  -o jsonpath='{.status.results}'

Expected result: Hello World!

Reference

FieldValue
functionNamemain
inputsnone
daemonfalse
Proplet envnone required

On this page