New to Kestra?
Use blueprints to kickstart your first workflows.
Schedule a GPU pod on Kubernetes, run the job, collect its output file into Kestra storage, and report completion to Slack with full retry and lineage.
Run a GPU workload on Kubernetes and bring its result back into Kestra without writing glue scripts. This blueprint schedules a pod that requests an NVIDIA GPU, runs your container, captures the output file it writes, and posts the artifact location to Slack. It closes the gap between ad hoc kubectl run commands and a governed, repeatable GPU job that has retries, scheduling, and tracked outputs.
run_gpu_pod task (io.kestra.plugin.kubernetes.core.PodCreate) launches a pod in the gpu-jobs namespace that requests one GPU via the nvidia.com/gpu: 1 resource limit, using the nvidia/cuda runtime image.nvidia-smi) and writes results to result.txt in the pod {{ workingDir }}. Kestra pulls that file back into internal storage through outputFiles.notify task (io.kestra.plugin.slack.notifications.SlackIncomingWebhook) posts a message containing the collected artifact URI from {{ outputs.run_gpu_pod.outputFiles['result.txt'] }}.nightly_job trigger (io.kestra.plugin.core.trigger.Schedule, cron 0 2 * * *) can run the job on a schedule. It ships disabled so you can enable it when ready.kubectl runs.Kubernetes schedules pods, but it does not orchestrate a job lifecycle: collecting outputs, retrying on failure, tying runs to upstream events, or notifying downstream systems. Kestra adds event and schedule triggers, automatic retries, full execution lineage, and a single declarative YAML definition. The artifact is captured into internal storage so every run is traceable, something a raw pod spec or a CronJob cannot give you.
A Kubernetes cluster with GPU nodes and the NVIDIA device plugin installed, plus a Slack incoming webhook.
K8S_MASTER_URL: Kubernetes API server URL.K8S_TOKEN: OAuth token for Kubernetes API access.SLACK_WEBHOOK_URL: Slack incoming webhook URL.image and command with your own GPU job, writing outputs to {{ workingDir }}.outputFiles.nightly_job trigger when you want scheduled runs.nvidia.com/gpu, or add CPU and memory limits.