Skip to main content
Flokoa uses two separate Custom Resources to wire a language model into an agent: a ModelProvider, which holds the connection configuration and credential reference for a given provider, and a Model, which names a specific model and tunes its inference parameters. This separation means you can define your OpenAI credentials once and reuse them across as many models and agents as you need. Follow the steps below to go from raw API key to an agent that can call an LLM.
Never hardcode API keys directly in your manifest files. Anyone with read access to your Git repository or cluster would be able to extract them. Always store credentials in Kubernetes Secrets and reference them by name as shown in this guide.
1

Create the API key secret

Create a Kubernetes Secret in the same namespace where your ModelProvider will live. Choose the command that matches your provider:
For AWS Bedrock, credentials are typically supplied through IAM Roles for Service Accounts (IRSA) rather than a static secret — see Step 2 for details.
2

Create a ModelProvider

Create a ModelProvider resource that references the secret you just created. Exactly one provider block must be present in each ModelProvider spec.
Common OpenAI models: gpt-4o, gpt-4o-mini, gpt-4-turbo, o1, o3-mini
Apply your chosen manifest:
3

Verify the ModelProvider

Check that the operator has validated the provider configuration and marked it as ready:
If READY shows false, describe the resource for detailed condition messages:
Common issues at this stage are a missing secret, a wrong key name in the secret, or a typo in the provider block.
4

Create a Model

A Model resource names the specific model string the LLM provider expects, sets inference parameters, and links back to the ModelProvider you just created. Save the following as model.yaml and adjust the values to match your provider:
The model field must match the exact string your provider accepts. Refer to the provider tabs in Step 2 for common model names.Apply the manifest:
5

Attach the model to an Agent

Reference the Model resource from your Agent spec using the spec.model field:
The operator resolves the reference chain at reconciliation time: Agent → Model → ModelProvider → Secret. Your agent container will receive the resolved model name, inference parameters, provider endpoint, and API key.To reference a model that lives in a different namespace, add the namespace field:
6

Verify the Model is ready

Confirm the Model has resolved its provider reference successfully:
Check the full status if needed:
A Ready: True condition with reason ProviderFound confirms the model is correctly wired to its provider and your agents can begin using it.
You can deploy ModelProvider and Model resources in a dedicated shared namespace — for example shared-resources and shared-models — and reference them from agents in any application namespace using the namespace: field. This prevents teams from duplicating provider configuration and ensures a single secret rotation point.