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.
For detailed shared pipeline behavior (also used by diff and apply), see
Rendering Pipeline.
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).-p, --profile <PROFILE>- Profile to use for rendering. If omitted, Nyl triesdefault; if profiles exist butdefaultis missing, rendering fails with an error.--max-depth <MAX_DEPTH>- Maximum evaluation depth for recursive resource expansion (default: 10)--track-parent- Track parent resource information in annotations
Offline Mode Options
Section titled “Offline Mode Options”--offline- Skip Kubernetes discovery and use CLI/config-provided API information (useful for CI/CD)--kube-version <KUBE_VERSION>- Kubernetes version for Helm templating. Overridesnyl.toml.--kube-api-versions <KUBE_API_VERSIONS>- Kubernetes API versions for Helm, comma-separated or repeated. Overridesnyl.toml.
Examples
Section titled “Examples”Basic Rendering
Section titled “Basic Rendering”# Render a manifest filenyl render manifest.yaml
# Render with specific profilenyl render -p 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.yamlOffline Mode
Section titled “Offline Mode”# Render in offline mode using CLI-provided Kubernetes target metadatanyl render --offline --kube-version 1.30 --kube-api-versions v1,apps/v1 manifest.yaml
# Render in offline mode using [project.kubernetes] or [profile.<name>.kubernetes]nyl render --offline -p production 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
# Combine optionsnyl render -p staging --max-depth 3 --track-parent manifest.yaml- Nyl processes single files only. Directory paths are not supported.
- See Rendering Pipeline for namespace resolution, filter semantics, and online/offline behavior.
ApplicationGeneratorsource resolution first honorsNYL_APPGEN_REPO_PATH_OVERRIDE, then tries to reuse the current local Git checkout whenrepoURLmatches a local remote andtargetRevisionisHEADor the current branch, then falls back to ArgoCD checkout reuse and normal Git cache/worktree resolution.- Local ApplicationGenerator testing override: set
NYL_APPGEN_REPO_PATH_OVERRIDEto a local repository root (or@gitto auto-detect the Git root from the currentPWD) to make ApplicationGenerator scan the local filesystem instead of cloning. This affectsrender,diff, andapply(all use the same render pipeline). Using@gitoutside a Git repository fails with a configuration error. - ApplicationGenerator discovery semantics:
source.pathscans non-recursively by default; use glob selectors (orsource.paths) for recursive discovery, and include/exclude patterns match relative paths.