Odin on-premises · Kubernetes multi-server

Architecture and Operational Flows

Multi-server high availability on Kubernetes (kubeadm)

Document
ODIN-K8S-02
Version
0.9
Classification
Customer-facing
Date
November 2026

0.Status of this document

Design baselineThe architecture, component placement and security controls in this document are final. The availability figures in section 2 are acceptance targets for the kubeadm validation, not measurements: the k3s deployment has been measured, the kubeadm deployment has not yet been run end to end. See ODIN-K8S-03 section 8.

1.Architecture

1.1Characteristics

Table 1. Architecture characteristics
CharacteristicDetail
Symmetric serversEvery server runs the Kubernetes control plane with stacked etcd, the Odin application and the data services. No server has a special role after installation
Single-server fault toleranceetcd quorum 2 of 3; database, cache and file storage replicated across the servers; the load balancer removes an unavailable server
Standard KubernetesBuilt with kubeadm and nothing else. No vendor distribution, no proprietary agent, no custom API server, so your existing Kubernetes tooling and audit process apply unchanged
Air-gapped operationKubernetes, containerd, the CNI plugins, container images and the SELinux policy are delivered in the release package; no internet access at any time
Registry-free image distributionImages are imported on every server into the Odin containerd and pinned against garbage collection. No registry is deployed or required
Local storageData on local SSD or NVMe on each server, provisioned through a local-path volume provisioner; every backup set held on all three servers
Non-disruptive changeImage patches, rollbacks, OS patching and certificate renewal proceed one replica or one server at a time

1.2Architecture overview

Entry

Customer usersBrowser · HTTPS only
Customer internal DNSweb · api · files names → App VIP
Admin jump hostSSH 22 to every server, direct

Customer L4 load balancer

App VIP : 443→ each server :443 · port 80 redirects to 443
L4 pass-through · SNAT on · health check every 5 s
Cluster address : 6443→ each server :6443 · servers join through it
or claimed in-cluster by kube-vip

HTTPS 443 · Kubernetes API 6443

Three identical servers · any one can be lost

Server 1control plane · 16 vCPU · 64 GB

IngressTraefik DaemonSet :80 · :443
customer TLS certificate
Applicationweb · fastapi-backend · odin-ml
celery-worker · celery-ingest · celery-beat
Data servicesPostgres (CNPG) primary
Redis + Sentinel
MinIO (erasure coded) · GoTrue
KubernetesAPI :6443 · etcd :2379-2380
kubelet :10250
controller-manager :10257 · scheduler :10259
flannel :8472/udp · CoreDNS · kube-proxy
/var/lib/odin/containerd
/var/lib/etcd
/var/lib/odin/local-path
/var/lib/odin-backups

Server 2control plane · 16 vCPU · 64 GB

IngressTraefik DaemonSet :80 · :443
Applicationweb · fastapi-backend · odin-ml
celery-worker · celery-ingest · celery-beat
Data servicesPostgres standby
Redis replica
MinIO (erasure coded) · GoTrue
KubernetesAPI :6443 · etcd :2379-2380
kubelet :10250
controller-manager :10257 · scheduler :10259
flannel :8472/udp · CoreDNS · kube-proxy
same layout as server 1
every backup set, on all 3

Server 3control plane · 16 vCPU · 64 GB

IngressTraefik DaemonSet :80 · :443
Applicationweb · fastapi-backend · odin-ml
celery-worker · celery-ingest · celery-beat
Data servicesPostgres standby
Redis replica
MinIO (erasure coded) · GoTrue
KubernetesAPI :6443 · etcd :2379-2380
kubelet :10250
controller-manager :10257 · scheduler :10259
flannel :8472/udp · CoreDNS · kube-proxy
same layout as server 1
every backup set, on all 3
Figure 1. Odin on three identical servers behind the customer L4 load balancer. Network detail: ODIN-K8S-01 section 4.

1.3Components

Table 2. Components and placement
LayerComponentPlacementAvailability
EntryCustomer L4 load balancerApp VIP on TCP 443 for users; the cluster address on TCP 6443 for the Kubernetes API, or an in-cluster VIPCustomer-managed
IngressTraefikDaemonSet on every server, hostPort 80 and 443Load balancer distributes to healthy servers
ApplicationWebReplicas across serversRolling update; tolerates one server loss
ApplicationAPI (fastapi-backend)Replicas across serversRolling update; tolerates one server loss
Applicationcelery-workerOne replica per serverUpdated one replica at a time
Applicationcelery-ingestOne replica per serverUpdated one replica at a time
Applicationcelery-beatTwo or more replicasLeader election; one active scheduler
Applicationodin-mlOne replica per serverInference continues on remaining replicas
DataPostgreSQLThree instances: one primary, two standbys, connection poolerStreaming replication; automatic failover
DataRedis with SentinelReplicas across serversSentinel promotes a replica on failure
DataMinIOThree instances, one per server, erasure codedObjects available with one server down
DataGoTrueCluster workloadStateless; state held in PostgreSQL
Platformkubeadm control plane and etcdAll three servers, stacked etcdQuorum 2 of 3
Platformflannel (VXLAN)All three serversPod network across servers
PlatformCoreDNSCluster DNSProtected by a disruption budget
Platformkube-proxyAll three serversService routing
Platformkube-routerAll three servers, NetworkPolicy onlyflannel does not enforce policy; kube-router does
Platformlocal-path provisionerAll three serversBinds persistent volumes to the local data disk
Platformhelm-controllerCluster workloadApplies the Odin chart; the same controller version k3s embeds
Platformkube-vipStatic pod on all three serversIn-cluster VIP mode only; claims the cluster address by ARP
Two controllers that k3s provides for freek3s ships an embedded image mirror and a built-in service load balancer. On kubeadm neither exists, so Odin deploys a local-path provisioner for volumes and a Traefik DaemonSet with hostPort for ingress. Both are standard upstream components; neither changes the application.

2.High availability

The figures below are the acceptance targets for the kubeadm validation. They are derived from the measured k3s deployment and from the behaviour of the same data services; they are not yet measured on kubeadm. ODIN-K8S-03 section 6.1 is the test that proves them.

Table 3. Availability targets
EventService impact (target)Recovery
Unplanned loss of one serverDatabase writes pause about 22 s during standby promotion; intermittent request errors for about 65 s until the server is marked downAutomatic. The server rejoins on return
Planned server rebootNone. The server is drained and the database primary moved beforehandAutomatic, one server at a time
Image patchNone. Zero failed requests is the acceptance criterionRollback to any recorded state
RollbackNone. Zero failed requests is the acceptance criterion—
Loss of two serversService stopped; etcd quorum lostCluster state restored on the remaining server; replacement servers joined
Loss of the siteService stoppedRebuild on new servers from a backup set (section 6)
etcd quorum is the hard limitTwo of three servers must be available for the control plane to make progress. With two servers down the cluster stops accepting changes even though application pods on the remaining server may still be running. This is the same limit as the k3s deployment and is why the tier is three servers, not two.

3.Data flows

Table 4. Data flows
FlowPath
User requestBrowser → customer DNS → App VIP TCP 443 → Traefik on any server (TLS termination) → web or API service → PostgreSQL primary through the connection pooler, Redis
File upload and downloadBrowser → files name → App VIP TCP 443 → Traefik → MinIO, erasure coded across the three servers
Document processingAPI → Redis queue → celery-ingest → odin-ml inference → results stored in PostgreSQL and MinIO
Database replicationPostgreSQL primary → two standbys, streaming replication across the server VLAN
Cluster controlServers → cluster address TCP 6443; etcd replication between servers on TCP 2379-2380; kubelet on 10250; controller-manager and scheduler on 10257 and 10259
Pod networkflannel VXLAN between servers on UDP 8472, pod CIDR 10.42.0.0/16
Image distributionRelease package → imported into containerd on every server; no registry in the path
Backup replicationBackup set created on one server → copied to the other two over SSH

4.Change management

Every change preserves data and configuration and starts with a backup. Backups are scheduled; recovery starts from a verified backup set.

Table 5. Change types
ChangeDeliveryService impactData and configuration
Application updateOdin image patch containing the changed imagesNonePreserved; backup taken first
RollbackPrevious recorded stateNonePreserved; backup taken first
Configuration changeSite configuration, re-appliedNonePreserved
Release upgradeOdin release package, applied as a Helm upgradeRolling; brief database failover pausePreserved; backup taken first
OS patchingCustomer OS repositoryNone; one server at a timePreserved
Certificate renewalCustomer certificateNonePreserved
Kubernetes upgradeOdin release package, one control-plane node at a timeRolling; brief API unavailability per nodePreserved; etcd snapshot taken first

A change starts only on a healthy cluster and completes only when every changed workload runs the new version and the cluster reports healthy. Every change is recorded in the cluster state history.

Upgrade is a Helm upgrade, not a node rebuildOn k3s an upgrade replaces the k3s binary on each server. On kubeadm the control plane is upgraded with kubeadm upgrade one node at a time and the application with a Helm upgrade. The two are separate steps and the installer runs them in that order.

5.Data protection

5.1Backup content

Table 6. Backup content
ElementContent
DatabaseOnline dump of the Odin database from the PostgreSQL primary, including roles
FilesMirror of every MinIO bucket
Secrets escrowGenerated secrets and installation settings, file mode 0600
Cluster stateetcd snapshot, plus /etc/kubernetes/pki (cluster CA, service-account keys, front-proxy) and the /etc/kubernetes/*.conf kubeconfigs
Completion markerWritten last; incomplete sets are never used for restore
The cluster PKI is part of the backup, not an afterthoughtk3s keeps everything a rebuild needs in one token and one directory. kubeadm does not: a rebuilt cluster needs the CA and service-account keys from /etc/kubernetes/pki or it cannot re-admit existing nodes or decrypt existing service-account tokens. These paths are in the daily set, and a restore that omits them is not a restore.

5.2Schedule

Table 7. Backup schedule
JobTimeAction
BackupDaily 00:00Database, files and secrets
Datastore backupDaily 00:52Backup with etcd snapshot and cluster PKI
ReplicationHourly at :40Every set copied to all three servers
Verification and archiveDaily 04:30Integrity check; weekly and monthly archive copies
Restore testWeeklyLatest set restored into a scratch database and compared with production

5.3Recovery objectives

Table 8. Recovery objectives
ObjectiveValue
RPO24 hours with the daily schedule; 1 hour with the hourly schedule
RTO, data restore3 to 5 minutes, increasing with data volume
RTO, site rebuild1.5 hours plus data restore time
Retention7 daily sets, 7 datastore sets, 4 weekly and 6 monthly archives
CopiesEvery set on all three servers; off-site copy to customer storage

6.Recovery

Table 9. Recovery scenarios
ScenarioProcedureService impact
Data corruption or deletionVerify the selected backup set in a scratch database; restore in place with the application stopped; health check and data-owner confirmation3 to 5 minutes
Permanent loss of one serverRemove the server from the cluster; provision a replacement to ODIN-K8S-01; join it as a control-plane node; backup replication refills itNone
Loss of the siteProvision three servers to ODIN-K8S-01; install the same release; rebuild cluster state from the etcd snapshot and cluster PKI, then volumes and data from the datastore set; verifyUntil rebuild completes
Site rebuild order matters on kubeadmThe cluster PKI is restored before kubeadm init so the rebuilt control plane presents the same CA and the same API server identity. Restoring the PKI afterwards produces a cluster that looks healthy but cannot re-admit the existing nodes or decrypt existing service-account tokens.

7.Security controls

Table 10. Security controls
AreaControl
ExposureTCP 443 to user networks only; TCP 6443 restricted to the servers and the load balancer; internal ports confined to the server VLAN
Transport encryptionTLS with the customer certificate, terminated on the Odin servers; Kubernetes API and etcd use mutual TLS
InternetDenied in both directions
Operating systemRHEL: SELinux Enforcing, firewalld enabled. Ubuntu: AppArmor and ufw enabled
SecretsGenerated at installation; held in the cluster and in backup escrow (mode 0600); configuration directory mode 0700
Software integrityRelease packages signed; packages and patches verified by SHA-256 before use
AdministrationSSH key authentication through the customer jump host; elevation through sudo; root SSH login disabled
Pod Security StandardsThe Odin namespace is labelled baseline. The chart is tested against that profile: no hostPath, hostNetwork, hostPID or hostIPC, no privileged containers, allowPrivilegeEscalation: false, capabilities dropped, seccompProfile set
Network policyEnforced by kube-router, because flannel does not enforce policy. Node probes are explicitly allowed so kubelet health checks are not dropped
Container runtimeA dedicated containerd instance with its own socket and data root; it shares no state with any runtime you already run