Exercise 1: Run your first QKO example
Let's run an example to calculate the value of Pi.
Install the Spark Operator
helm repo add spark-operator https://kubeflow.github.io/spark-operator
helm repo update
helm install spark-operator spark-operator/spark-operator \
--namespace spark-operator \
--create-namespace \
--set "spark.jobNamespaces={default}"
kubectl get pods -n spark-operator # spark-operator-controller should be Running
Install the Quanton Operator
helm upgrade --install quanton-operator oci://registry-1.docker.io/onehouseai/quanton-operator \
--namespace quanton-operator \
--create-namespace \
--set "quantonOperator.jobNamespaces={default}" \
--set onehouseConfig.enableAIAgent=true \
-f /path/to/onehouse-values.yaml
kubectl get pods -n quanton-operator # quanton-controller should reach 3/3 Running
The
enableAIAgent=trueflag tells the operator to auto-inject the agent plugin into every job — we'll use this in the next exercise. Drop it if you don't want the agent.
Submit the Pi example
git clone https://github.com/onehouseinc/quanton-operator
cd quanton-operator
kubectl apply -f examples/quanton-application.yaml
kubectl get pods -A | grep driver # driver pod will reach Running in ~1 min
When the driver pod is Running, tail the output:
kubectl logs -f quanton-spark-pi-java-example-driver | grep -i "pi is"
# Pi is roughly 3.1416568