Documentation home · Administrator guide · Console guide
Use this guide to operate an existing Orbit installation. Examples use the
installed controller in kube-system and an application OD named web in
team-a. Substitute the actual namespace and name. Obtain Kubernetes or admin
listener access through your cluster administrator's approved route.
Establish the current state
kubectl config current-context
kubectl -n kube-system get deployment orbit-deploy
kubectl -n kube-system get pods -l app=orbit-deploy
kubectl get orbit-deployments.k8s.tlspu.com -A
kubectl -n team-a get orbit-deployments.k8s.tlspu.com web -o yaml
kubectl -n kube-system logs deployment/orbit-deploy --since=15m
Read the OD's spec.source, path, ref, pause, replacements, images
and secret together. Verify whether another OD manages it or it manages its
own specification. Git or a parent can overwrite an imperative change.
The UI lists controller workers. Compare it with Kubernetes when an expected deployment is absent; a missing UI row does not prove its workloads are absent. The detailed JSON snapshot exposes worker progress:
kubectl -n kube-system port-forward service/orbit-deploy 8080:8080
In another terminal:
curl --fail http://127.0.0.1:8080/api/deployments/team-a/web
alive means the thread is alive. run_in_progress means a reconcile iteration
is running, and phase identifies its latest reported operation. Last activity
is measured separately from the last stored run timestamp. None of these fields
means the application is ready to serve traffic.
Understand one reconcile pass
- Load a fresh OD snapshot and its same-namespace Secret, if configured.
- Clone or fetch the configured repository and check out the selected ref.
- Verify the selected source against committed content, render all documents, and resolve scope and desired identities before applying workloads.
- Apply each desired object through current shared ownership decisions.
- If application succeeded, prune tracked identities absent from the inventory, checking live protection and ownership immediately before deletion.
- Store status separately from spec, then wait about 30 seconds.
Fetch, checkout, source access, metadata, token and conditional-list errors abort a pass. Invalid YAML, API discovery failures and individual Kubernetes object rejections are recorded per item; other valid manifests proceed, but the pass cannot prune. If YAML parsing fails mid-file, the unreadable remaining documents in that file are skipped too. Missing named Git refs are retried on later iterations; stale local refs are not treated as desired source. Apply failures can leave partial application but block that pass's pruning. Orbit does not implement an all-or-nothing transaction or a workload readiness gate.
Only files committed under the selected source path should be present in the checkout. Unexpected local files, incomplete checkouts or altered linked inputs cause a retrying source error. The logs identify the selected ref, commit ID and path. Do not repair controller working copies by editing files inside the Pod; repair the source or its access and let reconciliation retry.
Interpret tracking and ownership
A failed worker registration stays pending for retry without blocking other ODs or later watch events. A malformed CR or failed reload is logged with the OD's kind, name and namespace. A failed reload retains the previous complete worker snapshot. Use those logs when a live OD has no console row.
status.managedObjects maps keys such as
apps/v1|Deployment|team-a|web to desired-manifest SHA-256 hashes.
status.errors maps affected object keys to diagnostic messages. Source-level
failures can be recorded only in logs, so an empty error map is not proof that
every source operation succeeded. status.lastRun advances when status is
successfully stored; it is not a "last healthy rollout" timestamp.
The shared kube-system/orbit-deployment-owners ConfigMap stores owners.json.
Canonical ownership keys use API group, kind, namespace and name, independent
of served version; the core API group is empty. For example:
{
"apps|Deployment|team-a|web": {
"namespace": "team-a",
"name": "web",
"priority": 1
}
}
The map is refreshed for ownership transactions and writes are synchronous. Unrelated resources make API requests concurrently; competing operations on the same resource remain serialized. ConfigMap resourceVersion conflicts can be retried when only unrelated claims changed; a target takeover fails the old operation. See ownership transactions. Malformed content or unavailable reads/writes prevent operations from assuming ownership authority. An existing object's current owner wins over another deployment with an equal or lower desired priority. A higher priority can take over, subject to live update protection. A missing object allows a stale owner claim to be replaced. Skipping a lower-priority writer is not an error by itself.
Inspect authority without editing it:
kubectl -n kube-system get configmap orbit-deployment-owners \
-o jsonpath='{.data.owners\.json}'
Resource annotations named k8s.tlspu.com/applied-manifest record the deployment
namespace/name and applied content hash. For a currently owned object, that
receipt takes precedence over stale OD status, preventing a completed
recreation from being repeated after a failed status write and restart. The
annotation is not owner authority and does not prove workload health. Object,
ownership and status writes are separate requests; other crash gaps can still
need inspection.
Pause, resume and recover a worker
Pause through the console or Kubernetes:
kubectl -n team-a patch orbit-deployments.k8s.tlspu.com web \
--type=merge -p '{"spec":{"pause":true}}'
Pause stops subsequent source reconciliation. It does not suspend application Pods, roll back writes, cancel an already running pass, or prevent cleanup if the OD is deleted. A parent or self-referential Git manifest can later change the pause field. Verify the next worker snapshot and the authoritative source when using pause for an incident.
Resume after fixing the source or access problem:
kubectl -n team-a patch orbit-deployments.k8s.tlspu.com web \
--type=merge -p '{"spec":{"pause":false}}'
Use the UI Restart action or the endpoint below when a worker needs to be reloaded. Restart does not clear its Kubernetes status or remove its workloads.
curl --fail -X POST http://127.0.0.1:8080/api/deployments/team-a/web/restart
Retirement stops and joins the existing worker before starting a replacement. Forced restart waits up to 120 seconds for retirement; if a native call remains blocked, Orbit terminates the whole controller so Kubernetes can restart it. This can interrupt other deployments and the admin connection. Inspect controller logs and Pod restart counts after a long restart request.
The default watchdog checks every 60 seconds for a run that has made no reported progress for 1800 seconds. Idle or paused workers are not stuck merely because their previous run was a long time ago. Raise the configured threshold only when the observed workload requires it; see runtime settings.
Clear errors and purge state deliberately
Clear removes recorded errors. It does not fix a source, API or registry problem, and errors can return. Capture useful diagnostics first.
Purge preserves this deployment's ownership claims and priorities while clearing its tracking and errors. It requests reapplication on the next unpaused pass, bypassing unchanged-content and live-receipt skips for eligible objects. Ownership arbitration and Git no-update remain in force. Purge itself does not write or delete workloads, and forcing an unchanged recreate-on-change object uses an in-place update. A failed pass retains the request for retry; a Purge arriving during a pass requires a subsequent complete pass. Missing tracking also requires an apply even when a matching live receipt exists, so rebuilding cleared entries continues after worker replacement or controller restart.
Purge also forgets old objects absent from the current source, so those objects may no longer be pruned or cleaned up, while their ownership claims remain. A recreate-on-change target may require previously managed tracking which purge has removed. Purge is not a routine retry or stuck-worker action.
Both actions have tracked failure/replacement-race limitations in TODO.md. Avoid them during deletion/recreation of the same OD or an API outage. After a failed action, compare the worker snapshot, live OD status and owner ConfigMap before making another state-changing request.
Deploy or roll back a source change
Review and lint the source change, then commit it to the configured branch or
change spec.ref to the approved tag or available commit. Prefer a new reviewed
Git change over editing resources that Orbit will manage again. Changing a ref
can create, replace and prune resources, just as an ordinary source change can.
For example, selecting an already published tag:
kubectl -n team-a patch orbit-deployments.k8s.tlspu.com web \
--type=merge -p '{"spec":{"ref":"refs/tags/release-1.2.0"}}'
Removing the ref returns to the remote's current default branch:
kubectl -n team-a patch orbit-deployments.k8s.tlspu.com web \
--type=merge -p '{"spec":{"ref":null}}'
Check the selected commit in logs and the actual workload rollout. A rollback may prune resources introduced by the newer source or recreate annotated resources; it does not undo data migrations or restore deleted data. A missing target directory or ref causes retries, rather than declaring the inventory empty. A complete committed removal is eligible for normal pruning.
Retire an OrbitDeployment
- Find whether Git, a parent OD or self-management will recreate the CR. Change that authoritative source as part of retirement.
- Record the OD, its managed-object map, relevant owner entries, child ODs and workload/data dependencies before deletion.
- Decide which objects must remain. Set and verify live no-delete on each retained target before requesting removal. A desired-only annotation is insufficient until it has reached the live resource.
- Delete the OD, or remove its manifest from its active parent's source.
- Inspect cleanup logs and live resources. Account for protected retained resources and any failed deletions; cleanup is one best-effort attempt.
Example direct request after completing those decisions:
kubectl -n team-a delete orbit-deployments.k8s.tlspu.com web
kubectl -n kube-system logs deployment/orbit-deploy --since=10m
Cleanup uses the retired worker's own tracking. It checks that the original CR is gone, respects tenant scope, current ownership and live no-delete, and does not adopt a same-name replacement CR's state. There is no finalizer or durable cleanup retry queue. API failures or controller loss can leave objects behind.
For a normal protected removal, Orbit keeps the live object and releases its old tracking and owner claim. If the protected object is a child OD, its worker and independently owned resources can continue. If an unprotected child OD is deleted, that child's own deletion can lead to its own cleanup pass.
Deleting a Namespace or CRD can cascade through Kubernetes and remove protected children. Protect that parent target itself when it must survive. This is separate from directly deleting a protected child OD through parent-OD cleanup.
Avoid deleting and immediately recreating an OD as a retry technique. Cleanup skips an existing same-name replacement, and that new CR can have empty status which does not identify the previous deployment's objects.
Monitor and triage
Scrape /metrics on the admin listener. The supplied Pod has Prometheus scrape
annotations, but discovery of those annotations depends on your monitoring
setup; Orbit does not install a Prometheus server or ServiceMonitor.
Useful queries include:
# Recorded object errors by deployment.
orbit_deploy_error_objects > 0
# A running iteration without progress, using the default stuck threshold.
(orbit_deploy_run_in_progress == 1)
and on(namespace, name) (orbit_deploy_seconds_since_activity > 1800)
# Controller reconcile errors over the last 15 minutes.
increase(orbit_deploy_reconcile_runs_total{result="error"}[15m])
Correlate these with logs, controller Pod restarts, Kubernetes Events and application-specific readiness checks. Map-entry totals and gauges describe tracking, not guaranteed current ownership or healthy resources. Per-worker metric series are removed when a worker is removed.
| Symptom | Check and response |
|---|---|
| Controller will not start | Inspect node/default ConfigMap reads, CRD discovery, ServiceAccount rights and registry-policy parse errors. |
| Missing UI deployment | Compare live CRs with watch/registration logs, worker retirement and controller availability. Clear the browser filter. |
| Repeated Git error | Verify exact URL/ref/path, same-namespace Secret, repository access, SSH host keys and selected commit. Missing refs keep retrying. |
| No errors in the UI but no changes | Inspect logs for source-level errors, pause, priority skips, no-update in the Git manifest and whether the selected source hash changed. |
| Owner-cache error | Check the API and owners.json integrity. Do not delete the ConfigMap to bypass authority checks. |
| Image resolution error | Check source/proxy host, TLS bundle, token-service reachability, supported authentication and Secret entries. |
| Pruning did not run | Look for incomplete source, apply failures, live no-delete, a different current owner or missing tracking. |
| DELETE conflict | Re-read live UID/resourceVersion and protection; a race is not permission to issue an unchecked DELETE. |
| Recent Last Run, unhealthy Pods | Use native workload status and events. Orbit does not wait for readiness before pruning. |
| Controller exited during restart | Look for forced retirement or reaper-start failure, then verify Kubernetes restarted the Pod. |
| Protected child disappeared | Determine whether the child itself was deleted by Orbit, its live protection had been removed by an allowed update, or Kubernetes deleted its Namespace/CRD. |
For escalation, capture the OD spec/status, selected commit/ref/path, relevant owner entries, resource UID/resourceVersion and annotations, logs around the first failure, and controller image/restart count. Exclude Secret values.
Known operational limits
Do not switch a tracked resource between API-group aliases as an ordinary version migration; cross-group aliases are a tracked pruning limitation. Bare 4–40-character hexadecimal branch/tag names are ambiguous with historical commit IDs; use explicit refs or non-hexadecimal names. Registry authentication, source digest validation are recorded in TODO.md. Optional cache limitations are parked in INTERNAL_REGISTRY_TODO.md. Keep those limits separate from the intended target-only deletion rules.
For the single-line prefix contract and finding a manifest from an error, see logs and diagnostics. Persistent resource formats and creation time reporting are described in Kubernetes state.
