Cluster administrator guide

Documentation home · Operations · Reference

This guide covers installing Orbit Deploy and defining the environment in which cluster and tenant operators use it. Commands assume a local checkout of this repository and a kubectl context with the required administrator privileges. Example repository URLs, identities and domains must be replaced with your own.

Architecture and access boundaries

The controller runs in kube-system and watches OrbitDeployments across the cluster. Each OD has a worker that reads Git, resolves declared images, renders manifests, applies objects, prunes removed objects and writes status.

The supplied ServiceAccount has a ClusterRole granting all verbs on all API resources and non-resource URLs. This is a privileged controller. Tenant mode is an application-side scope check, not a separate, less privileged Kubernetes identity for each tenant. API admission, resource quotas and other cluster policies still apply to the objects submitted by the controller.

OD location Permitted manifest scope
kube-system Cluster-scoped resources and namespaced resources in any namespace.
Any other namespace Namespaced resources in that OD's namespace only.

Restrict who can create or modify ODs in kube-system, the controller Deployment, its ServiceAccount/RBAC, and its shared ConfigMaps. Treat write access to an unrestricted deployment's Git source as platform change authority.

The admin UI and JSON API have no application-level authentication or authorization. They expose all registered workers and mutation actions. Keep the Service internal; provide access through controlled port forwarding or an authenticated gateway. Giving someone the admin URL does not create a tenant scope restriction. The default admin listener is plain HTTP on port 8080.

Plan the installation

Before applying the supplied manifests, decide:

  • Which reviewed controller image version or digest to run.
  • Whether Orbit will manage its own installation through the bootstrap OD.
  • Which repositories, registries and API endpoints the controller must reach.
  • Which users may create ODs in each namespace and manage their credentials.
  • How operators will reach the console and how metrics will be collected.
  • How the shared ownership ConfigMap, OD status and credential sources will be backed up.

Run one controller replica. The implementation has no leader-election mechanism for coordinating multiple controller processes. Keep the supplied Recreate strategy so an upgrade stops the old controller before the replacement starts.

Git clones are stored below /tmp/orbit-deploy/<namespace>/<name>. These are working copies, not backups. The embedded registry is disabled by default; port 5000 and a registry Service in the manifest do not enable it.

The image entrypoint runs /sbin/tini -s -- /usr/bin/python3 -u /app/controller.py. Tini forwards signals to the controller, preserves its exit status and reaps orphaned descendants. Keep that entrypoint when installing or self-managing Orbit; a Kubernetes command override that starts Python directly bypasses the reaper. The -s option also enables adoption when Tini is not PID 1, such as a shared pod process namespace. Git's automatic maintenance stays in the foreground so each SSH transfer waits for its maintenance work to finish. See Git process diagnostics for incidents and verification after upgrading an affected pod.

Install

1. Review the bootstrap resources

Read the installation manifest. It contains the ServiceAccount, broad ClusterRole and binding, one-replica Deployment, admin and registry Services, and a final OD named orbit-deploy. That OD points at a public repository which can subsequently manage the installation.

Create a reviewed installation copy:

cp initial-install/orbit-deploy.yaml /tmp/orbit-install.yaml

Edit /tmp/orbit-install.yaml before applying it. Select your approved image reference instead of relying on the supplied latest tag. Change the final OD's source to your approved installation repository, or remove that document if you will manage the controller outside Orbit. If self-management is used, keep the image, replica count, rollout strategy and settings in that Git source consistent with the installation you intend to run.

For the existing TAK-OS companion deployment, read TAK-OS integration before promotion. Its image map, Ingress and rollout settings are maintained in a different Git repository and can differ from this source checkout's bootstrap manifest.

2. Install the CRD

kubectl apply -f initial-install/orbit-deploy-crd.yaml
kubectl wait --for=condition=Established \
  crd/orbit-deployments.k8s.tlspu.com --timeout=60s

The CRD is namespaced and serves k8s.tlspu.com/v1. Its plural name is orbit-deployments; the supplied CRD defines no short-name alias.

3. Set cluster replacement defaults, if required

The controller learns domain, addresses and external_addresses from node data at startup. domain falls back to localhost. A ConfigMap named kube-system/orbit-deploy overrides learned values and adds arbitrary string tokens:

apiVersion: v1
kind: ConfigMap
metadata:
  name: orbit-deploy
  namespace: kube-system
data:
  domain: example.com
  environment: production
  addresses: '["10.0.0.10", "10.0.0.11"]'

Apply your ConfigMap before starting the controller. These defaults are read at process startup; roll out the controller after changing them. Do not put credentials in replacement defaults: tokens are rendered into workload objects.

4. Start and verify the controller

kubectl apply -f /tmp/orbit-install.yaml
kubectl -n kube-system rollout status deployment/orbit-deploy --timeout=180s
kubectl -n kube-system get pods -l app=orbit-deploy
kubectl -n kube-system logs deployment/orbit-deploy --tail=100
kubectl get orbit-deployments.k8s.tlspu.com -A

Verify the logs show successful Kubernetes initialization, cluster defaults, the expected registry setting, and an admin listener bind. Startup fails if required node/configuration reads fail; it does not substitute a partial set of cluster defaults.

Open the console through a local tunnel:

kubectl -n kube-system port-forward service/orbit-deploy 8080:8080

Browse http://127.0.0.1:8080/ui/. From another terminal, curl --fail http://127.0.0.1:8080/api/deployments checks the API. An empty list is valid when no workers have been registered yet. A successful HTTP response does not verify workload readiness or access to every source repository.

Provision tenant access

Create each tenant namespace through your normal platform process. Grant its operators permissions on ODs in that namespace, plus the separately approved rights they need for credentials and inspecting workloads. For example:

apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: orbit-tenant-operator
  namespace: team-a
rules:
  - apiGroups: ["k8s.tlspu.com"]
    resources: ["orbit-deployments"]
    verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: orbit-tenant-operators
  namespace: team-a
subjects:
  - kind: Group
    name: team-a-operators
    apiGroup: rbac.authorization.k8s.io
roleRef:
  kind: Role
  name: orbit-tenant-operator
  apiGroup: rbac.authorization.k8s.io

This example grants OD management only. It does not grant console access, Secret access, namespace creation or workload inspection. Do not present the shared admin console as an RBAC-filtered tenant interface.

A namespaced manifest without a namespace is placed in the OD's namespace. Cross-namespace and cluster-scoped manifests from tenant ODs fail complete inventory validation and block that pass. ODs can themselves load child ODs; tenant children must remain in the same namespace.

Network and source trust

The controller needs access to the Kubernetes API, DNS, configured Git servers, OCI registries, and any registry token or redirected content services. Nodes also need access to the registries used by the final rendered Pod images. Registry access from the controller does not configure node image-pull access.

For SSH Git sources, provision sshKnownHosts through the source Secret to enable host-key verification. If it is absent or empty, the current behavior accepts SSH hosts without verification. Obtain trusted host keys through your normal trusted channel. See the credential examples.

Do not expose the admin listener through an unrestricted public Ingress. Where an existing gateway is used, route both /ui/ and /api/, plus static assets. The console uses absolute paths at the origin root; a subpath-only proxy needs matching rewrite rules. Restrict /metrics according to your monitoring access policy as well.

OCI registry policy and certificates

Optional ConfigMap kube-system/orbit-deploy-registries controls source-image proxy rewrites and exceptions to OCI TLS verification:

apiVersion: v1
kind: ConfigMap
metadata:
  name: orbit-deploy-registries
  namespace: kube-system
data:
  proxies: |
    registry-1.docker.io: mirror.example.com/dockerhub
    registry.gitlab.com/team: mirror.example.com/gitlab-team
  insecure: |
    - legacy-registry.example.com

Proxy entries omit schemes and trailing slashes. Matching respects path boundaries and the longest matching prefix wins. The declared tag or digest is preserved. Use fully qualified registry hostnames so rendered references remain unambiguous to container runtimes. Proxy credentials are looked up for the proxy host in the OD's Secret.

insecure contains exact lowercase hostnames or IPv4 addresses, without ports, paths, schemes or wildcards. It applies to that hostname on every port, not to its subdomains. Requests normally verify TLS, including token requests and redirect destinations. Plain HTTP to an external host requires an explicit exception. An additional token or redirect host needs its own exception.

The policy is loaded at startup and refreshed every 60 seconds. A missing ConfigMap means no rewrites or external exceptions. An invalid initial policy or failed initial read prevents startup; a failed refresh keeps the last valid policy. This refresh is separate from the startup-only replacement defaults.

For private CAs, mount a PEM CA bundle and set REQUESTS_CA_BUNDLE to its path. For revocation checking, also mount a PEM CRL bundle and set ORBIT_REGISTRY_CRL_BUNDLE. CRLs must cover the issuers needed for full-chain checks and must be refreshed by your certificate-management process. Orbit does not fetch CRLs or perform OCSP queries automatically. These controls are for the OCI client; configure Git trust and node registry trust separately.

Optional embedded registry

The shipped Deployment explicitly sets ORBIT_INTERNAL_REGISTRY_ENABLED=false. Keep that setting unless you have deliberately evaluated the optional registry. Embedded-registry limitations and deferred work are recorded in INTERNAL_REGISTRY_TODO.md.

If enabling it in an evaluated environment, configure the listener, Service, address used for image rewrites, storage root and persistent volume together. The supplied PVC and volume mount are commented out. Without persistent storage, registry data is lost when the Pod is replaced. The default registry listener on port 5000 is distinct from the admin listener on 8080. Its OCI protocol routes allow writes without authentication; the console's browse views are read-only. Network access to the registry therefore requires its own controls. Nodes must be able to pull from the chosen address and trust its transport configuration.

The controller's own image is excluded from internal-cache rewriting. Image tokens are still resolved against their source registry and pinned when the embedded registry is disabled.

Upgrades, backups and recovery

Before an upgrade, retain a reviewed copy of the controller manifests and image reference, the OD specifications and status, and the shared ownership ConfigMap. Back up Secrets using your existing secret-management process. For example, these exports capture the non-Secret reconciliation state:

kubectl get orbit-deployments.k8s.tlspu.com -A -o yaml > orbit-deployments-backup.yaml
kubectl -n kube-system get configmap orbit-deployment-owners -o yaml > orbit-owners-backup.yaml

The ownership ConfigMap is created automatically when needed. Its absence before any worker has used it is not by itself an installation error. OD exports can contain application configuration and source URLs; protect them accordingly.

Upgrade the managed source of the controller Deployment when self-management is enabled. Otherwise update the reviewed installation manifest and apply it. Keep one replica and Recreate. Expect a reconciliation and console interruption while the controller is replaced; existing application resources keep running. Check rollout status, logs, source access, ownership availability and selected workloads after the new process starts.

Restore reconciliation state with the controller stopped, using a plan that matches the current live resources. OD status and shared ownership are different records and need to be reconciled together. Applying an old export over live state can reintroduce stale tracking or stale owner decisions. Do not delete the owner ConfigMap as a routine cache reset: it is authority for ownership, not disposable derived data. The applied-manifest annotation on resources records completed applies but is not a replacement for ownership or inventory backups.

Retiring the installation

Decide first whether managed workloads should remain or be removed. Deleting an OD asks Orbit to clean up its tracked resources once; scaling the controller to zero stops reconciliation without asking it to delete those resources. An OD in Git may be recreated by another active parent OD.

For retention, protect the actual targets or stop the controller and follow a reviewed manual handover. Protecting a child resource does not protect its Namespace or CRD from deletion. Direct Kubernetes deletion bypasses Orbit's annotation checks. Do not use deletion of the OrbitDeployment CRD as a pause mechanism: that deletes the custom resources themselves and loses their status.

When teardown is complete, remove installation objects through the reviewed installation source. If self-management is active, account for the bootstrap OD before removing the controller it manages. See the operator guide's retirement procedure.