Deploy a Flow
This guide deploys a single Flow exposed at POST /greeter, backed by
Anthropic Claude.
1. Credentials
Section titled “1. Credentials”kubectl create secret generic anthropic-credentials \ --from-literal=ANTHROPIC_API_KEY=sk-ant-...2. Plugin
Section titled “2. Plugin”apiVersion: genkit.dev/v1alpha1kind: PluginConfigmetadata: name: anthropicspec: type: anthropic credentialsRef: name: anthropic-credentials credentialKeys: [ANTHROPIC_API_KEY]3. Model
Section titled “3. Model”apiVersion: genkit.dev/v1alpha1kind: Modelmetadata: name: claude-opusspec: provider: anthropic model: claude-opus-4-6 pluginConfigRef: name: anthropic defaultConfig: temperature: 0.3 maxOutputTokens: 10244. Prompt
Section titled “4. Prompt”apiVersion: genkit.dev/v1alpha1kind: Promptmetadata: name: greetingspec: content: | --- model: anthropic/claude-opus-4-6 temperature: 0.3 --- Greet the user named {{name}} in a single sentence.5. Flow
Section titled “5. Flow”apiVersion: genkit.dev/v1alpha1kind: Flowmetadata: name: greeterspec: image: ghcr.io/xavidop/genkit-runner:v0.4.1 modelRef: { name: claude-opus } promptRefs: - { name: greeting } port: 80806. Apply and verify
Section titled “6. Apply and verify”kubectl apply -f .kubectl get gfl greeterkubectl describe gfl greeter # check ConditionsWhen Ready=True:
kubectl port-forward svc/greeter 8080:8080 &curl -s -X POST http://localhost:8080/greeter \ -H 'content-type: application/json' \ -d '{"name":"Ada"}'7. Iterate
Section titled “7. Iterate”Edit the Prompt, reapply, and watch the rolling update:
kubectl edit prompt greetingkubectl rollout status deploy/greeterYou don’t need to bump anything else — the controller recomputes the content hash and patches the Deployment’s Pod template annotation automatically.