Skip to content

Realm manifest

apiVersion: v1beta1
kind: Realm
metadata:
  name: main
  labels: {}
spec:
  namespace: main.kukeon.io
  registryCredentials:
    - serverAddress: registry.example.com
      secretRef: { name: registry-registry-example-com }
status:
  state: Ready
  cgroupPath: /kukeon/main

See Concepts → Realm for what a realm is.

spec

spec.namespace (string, optional)

The containerd namespace this realm uses for its images, containers, and tasks. Defaults to <realm name>.kukeon.io; override when you need a different namespace.

spec.registryCredentials (array, optional)

Authentication for image registries. Scoped to the realm — two realms can use different credentials for the same registry.

Field Type Required Description
serverAddress string no Registry server (e.g., docker.io, ghcr.io). If omitted, applies to the registry in the image reference.
secretRef object one of A basic-auth Secret of this realm holding the username and password — an identity of the registry connector. name is required; the realm is always the Realm's own.
username string one of Inline registry username (the form that predates secretRef)
password string one of Inline registry password or token. Write-only: kuke get realm and the web UI never print it.

An entry carries either secretRef or an inline username and password, not both. Prefer secretRef: the password then lives in a root-only secret file instead of the realm's metadata, and rotating it is one kuke create secret.

spec:
  registryCredentials:
    - serverAddress: ghcr.io
      secretRef: { name: registry-ghcr-io }

kuke create registry-credential writes the Secret and this entry in one step, and moves an existing inline entry for the same server into a Secret. A Realm applied with an inline entry whose password is left out keeps the stored password, so the output of kuke get realm -o yaml — which never contains one — can be edited and re-applied.

A secretRef that cannot be read when an image is pulled (the Secret is missing or is not basic-auth) is logged and skipped: the pull proceeds without that credential and fails with the registry's own error if the image is private.

spec.defaults (object, optional)

The CellConfig fill every cell kukeond renders from a CellConfig inside this realm inherits. Same shape as the Config's own fill — values, repos, secrets — and merged Realm → Space → Stack → CellConfig, per key, deeper levels winning. See Defaults merge.

spec.defaults.git is the default git identity, credentials and signing config of every such cell — set once here instead of on each Config. It has the shape of a container's git block: author, committer and signing are replaced by a deeper level that sets them, and credentials[] merge by host. See the git credentials guide.

spec:
  defaults:
    git:
      author: { name: dev-bot, email: dev-bot@example.com }
      credentials:
        - { host: github.com, secretRef: { name: git-ssh, realm: default } }
      signing: { secretRef: { name: git-ssh, realm: default } }
spec:
  defaults:
    values:
      GIT_EMAIL: bot@example.com
    secrets:
      github-token:
        secretRef: { name: gh-token, realm: main }

spec.images (array, optional)

Named images cells rendered from a CellConfig can refer to by handle. A container whose (resolved) image equals an entry's name renders with the entry's reference, and the image's digest in the realm's containerd namespace is recorded on the cell. Each entry sets exactly one of ref or build:

Field Type Description
name string Handle, unique within the realm (required)
ref string Built-in or registry image reference
build.context string Build context directory (required with build)
build.dockerfile string Dockerfile path; relative paths resolve against context; defaults to <context>/Dockerfile
build.args map Build-time variables
build.tag string Image reference the build writes; defaults to kukeon.internal/<realm>/<name>:latest

Build a build entry with kuke build --realm <realm> --realm-image <name>. Rebuilding it with a new digest marks every cell that uses it OutOfSync (reason image <name> digest changed); kuke restart recreates them on the new image. The web UI's realm page lists the images and their digests.

spec:
  defaults:
    values:
      IMAGE: agent
  images:
    - name: agent
      build:
        context: /src/agent
        args: { VERSION: "1.2" }
    - name: base
      ref: docker.io/library/alpine:3.20

status

Field Type Description
state Pending, Creating, Ready, Deleting, Failed, Unknown Lifecycle state
cgroupPath string Absolute cgroup path: /kukeon/<realm>
subtreeControllers array of string Cgroup-v2 controller set actually delegated on this realm's cgroup.subtree_control after the host-root filter (e.g. cpu, memory, io, pids)
createdAt RFC3339 timestamp Wall-clock time of the first persist for this realm. Set once and never moves.
updatedAt RFC3339 timestamp Wall-clock time of the most recent persist.
readyAt RFC3339 timestamp Wall-clock time of the first State==Ready persist. Set-once: never overwritten on subsequent Ready transitions or flaps.
reason string Short reason code summarizing why state is in its current value. Empty when none has been recorded.
message string Human-readable detail backing reason; especially valuable on state: Failed.
cgroupReady bool Whether cgroupPath actually exists on the host filesystem as of the last status write — separates intent from observation.
containerdNamespaceReady bool Whether the containerd namespace recorded in spec.namespace was actually present as of the last status write.
observedGeneration int The metadata.generation the reconciler last acted on. Defaults to zero (omitted) and stays inert until writers begin bumping generation; the reconciler then compares the two to skip stale work.

status is populated by Kukeon; anything you set when applying is overwritten on reconcile.

Minimal

apiVersion: v1beta1
kind: Realm
metadata:
  name: mytenant
spec: {}

Equivalent to sudo kuke create realm mytenant — Kukeon fills in spec.namespace from the name.