Cross-namespace references are fully supported in Flokoa. An Agent in one namespace can reference a Model in another, a Model can reference a ModelProvider in yet another, and an Agent can reference AgentTools spread across multiple namespaces — all by adding an optional
namespace: field to the reference.Single namespace
The simplest possible layout puts every resource — Agents, Models, ModelProviders, and AgentTools — in a single namespace. This is ideal for individual developers, proof-of-concept work, and small teams that do not yet need resource isolation. Create the namespace and deploy everything into it:Shared resources pattern
For teams deploying multiple agents or applications, the recommended layout separates resources by their reusability and sensitivity:shared-resources:
shared-models, referencing the provider by namespace:
my-app can now reference these shared resources directly.
Environment isolation
When you need hard boundaries between development, staging, and production workloads, give each environment its own namespace. This approach pairs naturally with namespace-scoped ResourceQuotas, NetworkPolicies, and RBAC rules.Cross-namespace references
Reference any Flokoa resource in a different namespace by adding thenamespace: field to the reference. The following Agent spec demonstrates referencing a Model from shared-models and two AgentTools from shared-tools:
namespace: is omitted from any reference, Flokoa defaults to the same namespace as the referring resource.
RBAC for namespace access
Use Kubernetes RBAC to control which service accounts and users can read resources in shared namespaces. The following Role grants an agent service account the ability to read AgentTool resources in theshared-tools namespace, without giving it broader write access:
get and list on the specific resource types needed — follows the principle of least privilege.
Best practices
Use this checklist when planning your namespace layout:- Isolate secrets by environment. Never share Kubernetes Secrets containing production API keys with development namespaces.
- Centralise provider credentials. One ModelProvider per LLM provider in a shared namespace prevents drift and simplifies key rotation.
- Separate reusable tools from app-specific ones. Common integrations belong in
shared-tools; one-off tools can live in the application namespace. - Use namespace labels consistently. Labels like
environment: productionmake it easy to apply NetworkPolicies and audit queries across namespaces. - Scope RBAC to the minimum required. Grant
get/liston shared resources, not full*verbs. - Document your layout. A short README or architecture diagram in your GitOps repo prevents namespace sprawl as the team grows.
- Prefer
namespace:references over copying YAML. Duplicating a ModelProvider or AgentTool into every application namespace creates maintenance overhead and inconsistency.
Related guides
Deploy Your First Agent
Get an Agent running from scratch with a minimal manifest and kubectl.
Connect an LLM Provider
Create ModelProvider and Model resources and attach them to an agent.
Add Tools
Create shareable AgentTool resources backed by OpenAPI specifications.
High Availability
Configure replicas, probes, and anti-affinity for production-grade agents.
