Skip to main content
This is a resource-agnostic concept page. Every Datum Cloud resource — a DNSZone, an HTTPRoute, a Project, and so on — carries the same metadata block, so individual resource pages omit it and link here instead.
The Datum Cloud API is currently alpha (v1alpha1; the Gateway API resources are served at stable v1). Fields and behavior may change in backward-incompatible ways between releases.

Overview

Every resource you create or read has three top-level sections: metadata, spec, and status. The spec and status sections are specific to each resource kind, but metadata is shared and looks the same everywhere:
metadata holds the resource’s identity (its name), the labels and annotations you use to organize and describe it, and a set of system-managed fields the platform maintains for you.

Fields you set

These are the metadata fields you provide when creating or changing a resource.

Name

name identifies the resource within its scope. A Project-scoped resource’s name must be unique among resources of the same kind in that Project; a Platform-scoped resource’s name must be unique across the platform. Names are set once, at creation, and cannot be updated afterward — to “rename” a resource you delete it and create a new one. Names follow the standard DNS-compatible naming rules (RFC 1123): lowercase alphanumeric characters and -, starting and ending with an alphanumeric character (for example, example-com).
Some resources let the server generate a unique name for you instead of requiring one. When supported, you supply a name prefix and the platform appends a unique suffix. Check a resource’s schema with datumctl explain <resource>.metadata — see Discovering resources & schemas.

Labels

Labels are key/value pairs meant to be queried and selected on. Use them to attach identifying dimensions — team ownership, environment, application, tier — that you’ll later want to filter by:
Because labels are indexed for selection, keep the set small and stable, and use them for values you actually filter on. See Reading resources and Output formats & scripting for filtering and label-selector usage.

Annotations

Annotations are also key/value pairs, but they are for arbitrary metadata that is not queried — longer descriptions, tool state, change-ticket references, contact info, or data that automation reads and writes. They are not used for selection or filtering, so there’s no penalty for larger or more free-form values.
Labels vs. annotations: if you want to find or group resources by a value, use a label. If you just want to attach information to a resource, use an annotation.

Fields the platform manages

The platform populates and maintains the following fields automatically. They are read-only — do not set them in your manifests. They appear when you read a resource (for example with datumctl get -o yaml), and are useful for inspection and automation.
Don’t copy these fields into a manifest you’re applying. If you save a resource with datumctl get -o yaml and re-apply it, strip the system-managed metadata (and the entire status block) first — leaving resourceVersion in, for example, can cause an apply to be rejected. See Safe changes & declarative config.

The namespace field

You may notice a metadata.namespace field when you inspect a resource. In Datum Cloud you don’t manage namespaces directly — the user-facing scoping concept is the Project (or the Platform, for shared resources). Your active context determines where a resource lives, and the CLI sets scope with the --project flag rather than a namespace field you fill in by hand. See Contexts & scoping.

Working with metadata

  • Read it: datumctl get <resource> <name> -o yaml shows the full metadata block, including the system-managed fields. See Reading resources.
  • Change it: set name, labels, and annotations in your manifest and apply with datumctl apply -f. See Changing resources.
  • Explore it: datumctl explain <resource>.metadata prints the live schema for the metadata block. See Discovering resources & schemas.
Run datumctl explain <resource>.metadata --recursive to see the full, live metadata field tree for any resource.
Last modified on July 2, 2026