render
Render Kubernetes manifests from nyl components and templates.
Synopsis
Section titled “Synopsis”nyl render [OPTIONS] <FILE>Description
Section titled “Description”The render command generates Kubernetes manifests and writes final YAML to stdout.
It never connects to Kubernetes. With --target, a Release renders as
render-tree publishes it for its Argo CD Application, including managed
Namespaces; resources without a namespace keep none. See
Rendering Pipeline for the
behavior render, diff, and apply share.
Arguments
Section titled “Arguments”<FILE>- Path to the manifest file to render (required)
Options
Section titled “Options”Common Options
Section titled “Common Options”--only-source-kind <KIND>- Filter top-level resources by kind (e.g.,ConfigMap,Deployment) or by apiVersion/kind (e.g.,apps/v1/Deployment) before expansion.--only-kind <KIND,...>- Filter final rendered manifests to only include specific kinds (post-render).--exclude-kind <KIND,...>- Filter final rendered manifests to exclude specific kinds (post-render, mutually exclusive with--only-kind).--target <TARGET>- DeploymentTarget whose Cluster, values, and Kubernetes capabilities are used for rendering. Optional for base rendering.--input <NAME=JSON>- Set one Release input, for example--input replicas=3or--input image='"registry.example.com/api@sha256:…"'. Repeatable; wins over--inputsand target bindings.--inputs <FILE>- Read Release inputs from a YAML or JSON object.--application-group <NAME>- With--target, apply this ApplicationGroup’s bindings when the Release file is not in exactly one selected group’s local source.--defaults-only- With--target, apply no target binding: only Release defaults and overrides.--release-only- Settle the Release alone instead of taking it from the compiled target. Faster for large targets, but namespace conflicts with the target’s other Releases go undetected.--allow-secret-inputs- Let the project secrets provider andNYL_*environment variables affect the output, as for the tree commands. Without it, templates see neither.--max-depth <MAX_DEPTH>- Maximum evaluation depth for recursive resource expansion (default: 10)--track-parent- Track parent resource information in annotations--refresh- Bypass cached rendering results and replace successful entries.--no-cache- Perform no persistent cache reads or writes.
Source and Capability Options
Section titled “Source and Capability Options”--offline- Resolve Git charts from cached refs and readfromPublicationRelease inputs at the cached publication branch head, as withrender-tree --offline.--kube-version <KUBE_VERSION>- Kubernetes version for a targetless render of Helm charts. With--target, the Cluster’s committed capabilities apply.--kube-api-versions <KUBE_API_VERSIONS>- Kubernetes API versions for a targetless render, comma-separated or repeated.--context- Deprecated and ignored, sincerendernever connects to Kubernetes; see Deprecations.
Examples
Section titled “Examples”Output
Section titled “Output”With --target, the Release’s resources come out as its Argo CD Application
deploys them: the ConfigMap and Deployment keep no namespace, so the
Application’s destination namespace web applies, and the managed Namespace
awaits confirmation before it is pruned. Render statistics go to stderr.
$ nyl render --target production applications/web/release.yamlapiVersion: v1data: greeting: hellokind: ConfigMapmetadata: name: web-config---apiVersion: apps/v1kind: Deploymentmetadata: name: webspec: replicas: 3 selector: matchLabels: app: web template: metadata: labels: app: web spec: containers: - image: nginx:1.27 name: web---apiVersion: v1kind: Namespacemetadata: annotations: argocd.argoproj.io/sync-options: Delete=confirm,Prune=confirm name: webBasic Rendering
Section titled “Basic Rendering”# Render a manifest filenyl render manifest.yaml
# Render with a configured targetnyl render --target production manifest.yaml
# Filter top-level input resourcesnyl render --only-source-kind ConfigMap manifest.yaml
# Filter by full apiVersion/kindnyl render --only-source-kind apps/v1/Deployment manifest.yaml
# Filter final rendered output kindsnyl render --only-kind Deployment,Service manifest.yamlCapabilities and Cached Sources
Section titled “Capabilities and Cached Sources”# Targetless render of Helm charts with explicit Kubernetes capabilitiesnyl render --kube-version 1.30 --kube-api-versions v1,apps/v1 manifest.yaml
# Use the Cluster's committed capabilities and only cached Git refsnyl render --target production --offline manifest.yamlAdvanced Options
Section titled “Advanced Options”# Limit recursive expansion depthnyl render --max-depth 5 manifest.yaml
# Track parent resources in annotationsnyl render --track-parent manifest.yaml
# Force source resolution and manifest expansion to run againnyl render --refresh manifest.yaml
# Combine optionsnyl render --target staging --max-depth 3 --track-parent manifest.yaml-
A Release that declares
spec.inputsrenders with the same values asrender-tree: overrides, then the target binding of the selected ApplicationGroup whose source contains the file, then defaults. See Release inputs.nyl diffandnyl applyaccept the same input options. -
Nyl accepts one entry file.
Release.spec.includecan attach additional relative manifest files and glob matches; directory arguments are not supported. -
Expansion failures report the originating manifest path, document number, and recursive Component or HelmChart resource chain. This provenance is internal and is not added to rendered Kubernetes objects.
-
Bundle and Helm rendering use the shared content-addressed render cache.
diffandapplyreuse the same desired-manifest artifacts before performing their live-cluster operations. -
See Rendering Pipeline for the Release’s Application, namespaces, and filter semantics.
Manifest validation
Section titled “Manifest validation”Use --validate to run project-configured validators. See
Manifest validation for automatic validation, captured
CRD schemas, inherited Cluster contracts, and offline schema vendoring.
Validation failures return a nonzero exit status while still emitting manifests
to stdout for inspection. Diagnostics go to stderr.