What is a deployment?
A deployment in Niro is a managed workload — a set of Kubernetes manifests associated with a cluster, a namespace, and optionally a Git repository folder. Niro deployments are distinct from KubernetesDeployment objects: a Niro deployment can contain any number of Kubernetes resources (Namespace, ConfigMap, Secret, Service, Deployment, StatefulSet, HPA, Ingress, PVC, etc.) that together make up one logical application.
Creating a deployment
There are two ways to create a deployment:Visual Builder
The Visual Builder is a form-driven manifest generator. You fill in a form describing your workload — image, ports, environment variables, resource limits, storage, scaling — and Niro generates the Kubernetes YAML. You can then:- Apply immediately — send the manifests to the cluster right now
- Commit to Git — open a PR in your linked repo; the manifests are applied on merge
- Both — commit for history and apply now
Import from Git
If you already have Kubernetes manifests in a GitHub repo, use Import to scan the repo and convert existing YAML into Niro-managed deployments. Imported deployments are read-only initially; you can convert them to builder-managed deployments to enable visual editing.Apply lifecycle
When you apply a deployment, the following sequence happens:- Validate — Niro runs policy checks on the manifests (see Policies)
- Enqueue — Niro sends an apply command to the cluster’s agent
- Agent applies — the agent receives the command and calls the Kubernetes API (
kubectl applysemantics: create-or-patch) - Result — the agent reports per-object results (created, configured, unchanged, failed)
- Status update — the dashboard shows the apply result and stores it as the latest history entry
Apply statuses
| Status | Meaning |
|---|---|
| Pending | Command enqueued, waiting for the agent to pick it up |
| Succeeded | All objects applied successfully |
| Partial | Some objects applied, some failed |
| Failed | Apply command failed or was not acknowledged |
Rollback
Niro stores every successful apply as a history entry. To roll back:- Open the deployment detail page
- Click Rollback — Niro reopens a PR in your linked repo with the previous version of the manifests
- Merge the PR — Niro applies the previous manifests to the cluster
Rollback requires at least one prior successful apply. The
no-rollback-history policy finding surfaces when a deployment has never been successfully applied before.Drift detection
If your deployment is linked to a Git repo, Niro can detect drift — when the live cluster state diverges from what’s in the repo. Drift triggers adrift_detected incident and shows a diff in the deployment detail view.
Auto-sync (enabled per deployment) re-applies the repo state automatically when drift is detected.
Deleting a deployment
Deleting a deployment from Niro instructs the agent to remove only the specific objects that Niro previously applied — it never touches objects it didn’t create, and it never deletes the namespace.GitOps deployments
When a deployment is linked to a GitHub repo folder via GitOps, the lifecycle integrates with Git:- PR opened → Niro runs policy checks and AI review, posts a comment + check run
- PR merged → Niro applies (or deletes) the changed manifests to the cluster
- Merge result → Niro updates the GitHub Deployment status on the commit
Related
- Visual Builder — generate manifests without writing YAML
- Set Up GitOps — link a repo and enable PR-based deploys
- Policies — advisory standards checks run on every apply
- Deploy an App — step-by-step guide to deploying your first app