Require a Manual Approval
A deploy waits until a person approves the build. An ApprovalPolicy holds every new build of the Rollouts it selects, and a RolloutApproval lets one version through.
On this page
Require an approval
Label the Rollouts that need a person, then select them with an ApprovalPolicy in their namespace. The label is yours to choose; the policy only matches it.
kubectl -n hello-world label rollout hello-world approval.kuberik.com/required=trueapiVersion: kuberik.com/v1alpha1
kind: ApprovalPolicy
metadata:
name: production-approval
namespace: hello-world
annotations:
gate.kuberik.com/pretty-name: "Production approval" # shown in the dashboard
spec:
rolloutSelector:
matchLabels:
approval.kuberik.com/required: "true"For each matched Rollout the controller creates one RolloutGate named approval-gate-<suffix>. Its allowedVersions lists the versions approved for that Rollout and nothing else, so every newer build waits. An empty rolloutSelector matches every Rollout in the namespace.
To require approvals across namespaces, use a ClusterApprovalPolicy. Its namespaceSelector picks the namespaces; leave it out to match all of them.
apiVersion: kuberik.com/v1alpha1
kind: ClusterApprovalPolicy
metadata:
name: production-approval
spec:
namespaceSelector:
matchLabels:
environment: production
rolloutSelector: {} # every Rollout thereApprove a build
In the dashboard, open the rollout’s Gates tab and select Approve on the approval gate that reads Needs you. The dashboard creates the RolloutApproval as you, so your own Kubernetes permissions apply. It approves only current release candidates.


With kubectl, create the RolloutApproval yourself. It can name a version that does not exist yet, and its spec cannot change once created.
apiVersion: kuberik.com/v1alpha1
kind: RolloutApproval
metadata:
name: hello-world-1-4-0
namespace: hello-world
annotations:
approval.kuberik.com/by: emma.clarke@acme.com # optional, your username
spec:
rolloutRef:
name: hello-world
version: 1.4.0kubectl apply -f approval.yamlThe name hello-world-1-4-0 is the one the dashboard uses for the same build, so both ways of approving land on one object. One approval satisfies every approval gate of the Rollout. To withdraw it before the build deploys, delete it:
kubectl -n hello-world delete rolloutapproval hello-world-1-4-0Choose who may approve
Approving means creating a RolloutApproval. rollout-controller ships the ClusterRole kuberik-rollout-approver for that, and it is not part of edit or admin: bind it per namespace.
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: hello-world-approvers
namespace: hello-world
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: kuberik-rollout-approver
subjects:
- apiGroup: rbac.authorization.k8s.io
kind: User
name: emma.clarke@acme.com
- apiGroup: rbac.authorization.k8s.io
kind: User
name: james.porter@acme.comTwo admission policies come with the controller and need Kubernetes 1.30 or later. kuberik-rolloutapproval-by rejects an approval.kuberik.com/by that is not the requesting user, so the name on an approval is trustworthy. The dashboard shows that name only when the cluster has the binding kuberik-rolloutapproval-by with the Deny action, because a Warn or Audit binding lets a false name through. kuberik-approval-gate-guard lets only the controller change an approval gate, so editing the gate’s allowedVersions is refused.
Know when approval is skipped
Gates never hold a Rollout’s first deploy, so a brand-new Rollout does not wait for an approval. The approval gate still chooses the version: the first deploy takes the newest approved release, or the newest release when none is approved. This is intended, so the Rollout always reaches a running version.
A deploy by hand also skips the gate. Pinning a version with spec.wantedVersion, or Change version in the dashboard, deploys the build without an approval. rollout.kuberik.com/bypass-gates lets one build past every gate, and that deploy records no approval. Operate with kubectl covers all three.
Check the result
The policy lists the Rollouts it matched, and its Ready condition reads True with reason GatesSynced:
kubectl -n hello-world get approvalpolicy production-approval \
-o jsonpath='{.status.rollouts}{" "}{.status.conditions[?(@.type=="Ready")].message}{"\n"}'["hello-world"] 1 rollout(s) matched, gates in syncA waiting build names the approval gate under blockedBy, and the Rollout’s GatesPassing condition reads False with reason NoAllowedVersions:
kubectl -n hello-world get rollout hello-world \
-o jsonpath='{range .status.candidates[*]}{.tag}{" gated="}{.gated}{" blockedBy="}{.blockedBy}{"\n"}{end}'Once approved, the build deploys unless another gate or a health check holds it. The history entry records the approval:
kubectl -n hello-world get rollout hello-world -o jsonpath='{.status.history[0].approval}{"\n"}'{"by":"emma.clarke@acme.com","name":"hello-world-1-4-0"}Troubleshoot
The policy’s status.rollouts is empty
The selector matches no Rollout. Compare the labels:
kubectl -n hello-world get rollouts --show-labelsAdd the label to the Rollout, or fix rolloutSelector. A Ready=False condition with reason InvalidSelector means the selector itself does not parse.
Patching the gate fails with “only the rollout-controller may UPDATE a gate owned by an approval policy”
The gate guard refuses hand edits to approval gates. Create a RolloutApproval instead, as in Approve a build.
The dashboard reads Needs approval instead of Needs you
You may not create RolloutApproval objects in that namespace. Check:
kubectl -n hello-world auth can-i create rolloutapprovals.kuberik.comIf it answers no, ask an admin to bind kuberik-rollout-approver to you, as in Choose who may approve.
Next steps
- Operate Use the Dashboard Find and read rollouts, follow a pull request, and approve, skip, pin, retry or roll back from the Kuberik dashboard.
- Operate Operate with kubectl Pin a version, roll back, deploy a specific build, let a build past its gates, or resume after a failed bake.
- Concepts How Gates Work What holds a deploy back: RolloutGates, schedules, approvals, service dependencies and health checks.