Skip to content

Sample CRs

The repository ships a complete sample suite under config/samples/. Apply them in any order — the controller will retry until cross-CR references resolve.

Terminal window
kubectl apply -k https://github.com/xavidop/genkit-operator//config/samples?ref=main

The default sample uses Anthropic. The companion genkit_v1alpha1_pluginconfig_bedrock.yaml shows the same pattern for AWS Bedrock, and genkit_v1alpha1_pluginconfig_azureaifoundry.yaml for Azure AI Foundry.

References the anthropic plugin and sets default generation config (temperature, max tokens, top-p). Override these per-prompt via the Dotprompt frontmatter.

A Dotprompt document — YAML frontmatter (model: …, temperature: …) followed by a Handlebars body. The runner re-renders this on every request with the JSON payload as the template context.

A genkit-go ai.ToolDefinition plus an HTTP dispatch target. The runner surfaces the tool to the model and proxies tool calls to your service.

The single-Flow sample. Wires everything together and exposes POST /greeter.

The multi-flow sample. Three flows in one Pod, each at its own route.

genkit_v1alpha1_dataset.yaml and genkit_v1alpha1_eval.yaml

Section titled “genkit_v1alpha1_dataset.yaml and genkit_v1alpha1_eval.yaml”

A scheduled evaluation pipeline:

  • Dataset enumerates {input, reference} examples.
  • Eval runs that dataset against a Flow on a cron schedule and emits a Kubernetes Job.

Each sample uses metadata.namespace: default. Drop or change that field if you keep your workloads in a dedicated namespace, and remember that all cross-CR references are resolved within the same namespace — there is no cross-namespace reference.