GitOps

What self-healing actually means in an Argo CD workflow

Reconciliation can correct configuration drift. It cannot decide whether the desired state itself is safe, recover lost data, or own an incident.

Start with desired state

GitOps works when the repository is the reviewed description of what should run. A controller continuously compares that description with the cluster and reports or corrects differences.

This is more than automatic deployment. It changes the normal change path: edit desired state, review it, merge it, then let the controller reconcile.

Drift correction has a boundary

If a deployment replica count is changed manually, self-healing can return it to the value in Git. If the Git value is wrong, self-healing faithfully restores the wrong configuration.

Automation increases the speed and consistency of the chosen policy. It does not guarantee that the policy is wise.

Readiness protects traffic, not data

Kubernetes readiness probes help stop traffic reaching a pod that cannot serve useful requests. Liveness probes can restart a stuck process. Neither one restores a corrupted database or validates business correctness.

readinessProbe:
  httpGet:
    path: /ready
    port: 8000
  initialDelaySeconds: 10
  periodSeconds: 5

livenessProbe:
  httpGet:
    path: /health
    port: 8000

Pruning deserves protection

Automated pruning removes resources no longer present in desired state. That is useful for eliminating leftovers, but destructive mistakes can propagate quickly. Repository protection, review, sync windows, and careful namespace boundaries matter.

Keep secrets out of ordinary Git history

GitOps does not mean storing plain credentials in Git. A practical design uses an external secret system, encrypted manifests, or a supported controller with clear rotation and access ownership.

During an incident

Pause automation when it is amplifying harm or hiding investigation. Record manual emergency changes, then reconcile the repository deliberately so the normal operating model is restored.

A useful definition

In this context, self-healing means the controller can detect and correct supported drift between reviewed desired state and live Kubernetes objects. Everything outside that boundary still needs monitoring, backup, people, and judgment.

Read the EduCenter OS lab case study →