Skip to main content
The ModelProvider CRD stores the connection configuration that Flokoa uses to reach a Large Language Model provider. It separates authentication and endpoint settings from model parameters, so you can share a single provider across many Model resources without duplicating credentials. When you create a ModelProvider, the operator reads the referenced Kubernetes Secret, validates the configuration, and marks the resource ready for use by any Model in the cluster.

API reference


Supported providers

OpenAI

Connect to the OpenAI API for GPT-4o, o1, o3-mini, and other OpenAI models. Also compatible with any OpenAI-spec endpoint.

Anthropic

Connect to Anthropic’s API to use Claude Sonnet, Claude Opus, and other Claude models.

Google

Connect via API key for Google AI (Gemini) or use a service account for Vertex AI deployments.

AWS Bedrock

Connect to AWS Bedrock for managed model inference. Supports IRSA for keyless authentication on EKS.

Provider configuration

Create a Kubernetes Secret with your OpenAI API key, then create the ModelProvider:
Omit baseURL to use the default OpenAI endpoint. Set it only when pointing at a compatible third-party or self-hosted endpoint.

Advanced configuration

Custom endpoints and Azure OpenAI

You can point the openai provider at any OpenAI-compatible endpoint, including Azure OpenAI deployments:

Default request headers

Use defaultHeaders to attach arbitrary HTTP headers to every request made through this provider. This is useful for routing, tenant identification, or custom authentication schemes:

TLS configuration

For custom or internal endpoints that use self-signed certificates, configure the tls block:
Setting insecureSkipVerify: true disables certificate validation entirely. Never use this in production — it exposes your API traffic to man-in-the-middle attacks.

Status fields

After reconciliation the operator sets the following status fields:

Security best practices

  1. Never commit API keys to version control — always store them in Kubernetes Secrets.
  2. Restrict Secret access with RBAC — grant get on specific Secret names only to the service accounts that need them.
  3. Rotate keys regularly and update the Secret; the operator detects the secretHash change and reconciles automatically.
  4. Isolate environments with namespaces — keep development, staging, and production providers in separate namespaces.
  5. Always verify TLS for custom endpoints — do not use insecureSkipVerify: true in production.
  6. Prefer IRSA or Workload Identity over long-lived API keys wherever your provider supports it (e.g., AWS Bedrock with IRSA, Vertex AI with Workload Identity).
  7. Enable Kubernetes audit logging to track all Secret access events.
  8. Consider an external secrets operator (e.g., External Secrets Operator with AWS Secrets Manager or HashiCorp Vault) for centralised secret rotation.

Troubleshooting

Common causes:
  • The Secret named in apiKeySecretRef.name does not exist.
  • The Secret key does not match apiKeySecretRef.key.
  • The API key stored in the Secret is invalid or has been revoked.
After updating the Secret the operator automatically re-reads it and re-reconciles the provider. No changes to the ModelProvider manifest are needed.
  • Increase timeoutSeconds in the provider block (e.g., timeoutSeconds: 120).
  • Check that egress NetworkPolicies allow traffic from the operator pod to the provider’s HTTPS endpoint.
  • Verify DNS resolves correctly from within the cluster for custom baseURL values.
  • If you are behind a corporate HTTP proxy, ensure HTTP_PROXY and NO_PROXY are set on the operator Deployment.
Create a minimal Model resource that references the provider and watch whether it transitions to ready:
If the Model becomes ready, the provider credentials and network path are both working correctly.