This article explains how a change stored in Git becomes running containers. The network already exists and lets machines communicate; here we focus on deploying and maintaining applications without logging in over SSH to repeat commands.
The homelab has two kinds of deployment target: Kubernetes clusters and hosts running Docker Compose. They share the Mileto repository and the idea of declaring a desired result, but each needs its own deployment system.
Git describes the desired state
With manual operations, knowledge becomes scattered across commands, notes, and the memory of whoever made the change. With GitOps, the repository describes what should exist: image versions, resources, domains, operators, and policies.
A controller compares that declaration with reality. When it finds a difference, it tries to correct it. Git provides history and review; the controller provides continuous reconciliation.
This does not make every change in Git safe. Reviews, validation, and deployment order still matter. The benefit is that both the starting point and the proposed change are written down.
Talos reduces the cluster operating system
The Kubernetes nodes run Talos Linux, a minimal operating system built for that single job. It has no SSH access or conventional package manager. An API and declarative configuration manage it.
The configuration fixes the Kubernetes version, node addresses, disks, and network parameters. If a node becomes unusable, the goal is to rebuild it from those files rather than remember what was installed manually.
Talos manages the node. Kubernetes manages containers. ArgoCD keeps Kubernetes resources aligned with Git. These are three separate layers.
ArgoCD delivers changes to Kubernetes
ArgoCD watches the repository directories assigned to each cluster. A normal change follows this path:
- A version or manifest changes and is reviewed in Git.
- ArgoCD detects the new commit.
- It calculates the difference between Git and the cluster.
- It applies resources in the defined order.
- It checks that they reach a healthy state.
Bootstrap uses the App-of-Apps pattern. One initial application points at the directory that declares all the others. From then on, ArgoCD discovers and maintains operators, secrets, infrastructure, and applications.
Sync waves define the order. Operators arrive first because they provide new resource types. Secrets and databases follow. Applications start after their dependencies exist. If one layer is unhealthy, ArgoCD should not rush the next ones.
Kustomize and Helm solve different problems
Infrastructure manifests use Kustomize to start from a base and apply specific differences. This works well for a database, network policy, or Tailscale resource whose overall shape remains stable while a few values change.
Applications are packaged with Helm. A chart groups Deployments, Services, configuration, and values. Each image version remains separate from the template that says how it should run.
You do not need to know both syntaxes to understand the flow: Kustomize composes manifests; Helm parameterizes an application; ArgoCD gives the result to Kubernetes and watches its state.
Controllers perform the repetitive work
Kubernetes becomes valuable when operators turn an intention into operational tasks. CloudNativePG creates and maintains PostgreSQL. External Secrets Operator synchronizes credentials. K8up schedules backups. The Tailscale operator creates private connections.
The manifest does not describe every command. It may declare that a PostgreSQL cluster with a particular policy should exist. The operator observes that resource and carries out the required steps.
This automation also creates dependencies. That is why sync-wave order matters and why each operator must expose an observable status. GitOps does not remove failures; it makes clear which system is responsible for correcting them.
ptolomeo deploys Docker Compose
Not everything belongs in Kubernetes. VPSs and some virtual machines run smaller stacks with Docker Compose. They run ptolomeo, an agent based on doco-cd that checks the repository periodically.
Each host declares which directories belong to it. When one changes, ptolomeo updates the repository and runs Docker Compose to bring the containers closer to their declared state. Credentials come from Infisical during deployment; they are not stored in the Compose file.
The outcome resembles ArgoCD, with fewer layers:
- ArgoCD reconciles Kubernetes resources inside a cluster.
- ptolomeo updates Docker Compose stacks on a particular host.
- Git stores the configuration and history for both.
What happens when a version is published
A new Zetesis Portal version does not reach production by copying source code to a server. The build produces a container image identified by a version. Deployment configuration then references that image.
ArgoCD detects the version change and asks Kubernetes to update the pods. Kubernetes creates the new ones, waits until they are ready, and removes the old ones. If the service never becomes healthy, the deployment is visibly degraded and Git can point back to the earlier version.
With Docker Compose, ptolomeo downloads the selected image and recreates the relevant container. The mechanism differs, but the deployed version remains explicit.
What GitOps does not solve
GitOps does not decide who may communicate over the network, allow passwords to be committed in plain text, or prove that a backup can be restored.
The networking article explains connection paths. Security and operations covers how secrets arrive without being published. Backups and restore handles data recovery.
GitOps makes a narrower contribution: it turns operational configuration into reviewable state and assigns a controller to keep working toward it.
Complete series
- The big picture
- Networking
- Kubernetes and GitOps
- Security and operations
- Observability
- Backups and restore