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.
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
- OpenAI
- Anthropic
- Google
- AWS Bedrock
Create a Kubernetes Secret with your OpenAI API key, then create the
ModelProvider:Advanced configuration
Custom endpoints and Azure OpenAI
You can point theopenai provider at any OpenAI-compatible endpoint, including Azure OpenAI deployments:
Default request headers
UsedefaultHeaders 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 thetls block:
Status fields
After reconciliation the operator sets the following status fields:Security best practices
- Never commit API keys to version control — always store them in Kubernetes Secrets.
- Restrict Secret access with RBAC — grant
geton specific Secret names only to the service accounts that need them. - Rotate keys regularly and update the Secret; the operator detects the
secretHashchange and reconciles automatically. - Isolate environments with namespaces — keep development, staging, and production providers in separate namespaces.
- Always verify TLS for custom endpoints — do not use
insecureSkipVerify: truein production. - 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).
- Enable Kubernetes audit logging to track all Secret access events.
- Consider an external secrets operator (e.g., External Secrets Operator with AWS Secrets Manager or HashiCorp Vault) for centralised secret rotation.
Troubleshooting
ModelProvider is not becoming Ready
ModelProvider is not becoming Ready
- The Secret named in
apiKeySecretRef.namedoes not exist. - The Secret key does not match
apiKeySecretRef.key. - The API key stored in the Secret is invalid or has been revoked.
Authentication errors when calling the LLM
Authentication errors when calling the LLM
ModelProvider manifest are needed.Connection timeouts to the provider API
Connection timeouts to the provider API
- Increase
timeoutSecondsin 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
baseURLvalues. - If you are behind a corporate HTTP proxy, ensure
HTTP_PROXYandNO_PROXYare set on the operator Deployment.
Verifying connectivity end-to-end
Verifying connectivity end-to-end
Create a minimal If the Model becomes ready, the provider credentials and network path are both working correctly.
Model resource that references the provider and watch whether it transitions to ready: