Namespaces
A namespace is a logical scope for resources. Two services can share a name as long as they’re in different namespaces. Tokens, policies, and namespaces themselves live in the special system namespace.
Built-in namespaces
Section titled “Built-in namespaces”| Namespace | Purpose |
|---|---|
default | Where workloads land if you don’t specify one. |
system | Internal — tokens, users, policies, namespaces. You rarely touch it. |
Both are seeded automatically on first server start.
Creating a namespace
Section titled “Creating a namespace”rune create namespace prodrune create namespace stagingOr declaratively:
namespace: name: prod description: Production workloadsrune cast prod-ns.yamlUsing a namespace
Section titled “Using a namespace”Most commands take -n / --namespace:
rune get services -n prodrune cast api.yaml -n prodrune scale api 5 -n prodOr set a default per context:
rune login prod \ --server runed.example.com:7863 \ --token-file ./prod.token \ --namespace prodNow rune defaults to prod for that context.
The service.namespace: field in your YAML wins over -n if both are set, so prefer one approach per environment.
Cross-namespace references
Section titled “Cross-namespace references”Most things are scoped to a single namespace. The exceptions:
- Tokens, users, policies live in
systemand are global. - Service dependencies can target other namespaces explicitly:
dependencies:- service: postgresnamespace: data
Secrets and configmaps cannot be referenced across namespaces. Copy them or use a runeset.
Listing across namespaces
Section titled “Listing across namespaces”rune get services --all-namespacesThis requires a policy that allows the verb in * namespace.
Listing namespaces
Section titled “Listing namespaces”rune get namespacesDeleting a namespace
Section titled “Deleting a namespace”rune delete namespace stagingRefuses if the namespace contains resources unless you pass --force (cascade delete).