GitOps or Die: Why "ClickOps" is Costing You Sleep
I still remember the silence. It was 2019, and a junior sysadmin had just manually applied a hotfix to our production cluster in Oslo. It worked perfectly—until the auto-scaler kicked in three hours later, spun up new nodes using the old configuration, and crashed the entire payment gateway. That outage cost us more in SLA credits than our entire yearly infrastructure budget.
If you are still SSH-ing into servers to run apt-get install or tweaking Nginx configs by hand, you are building a house of cards. In 2023, the standard isn't just automation; it's reconciliation. It's GitOps.
For DevOps teams operating in Europe, and specifically Norway, the stakes are higher. We aren't just battling downtime; we are navigating the post-Schrems II landscape where data sovereignty is non-negotiable. Here is how to build a GitOps workflow that satisfies both the Datatilsynet auditors and your need for speed.
The Core Principle: Git as the Single Source of Truth
GitOps flips the traditional operational model. Instead of pushing changes to the cluster, your cluster pulls changes from Git. If it's not in the repo, it doesn't exist.
We recently migrated a high-traffic e-commerce platform to this model. The goal: absolute immutability. If a node fails, we don't fix it. We kill it and let the cluster spawn a clone defined strictly by the code.
The Toolchain (Mid-2023 Edition)
For a robust stack, we are looking at:
- Infrastructure Provisioning: Terraform (v1.4+)
- Container Orchestration: Kubernetes (v1.27)
- Continuous Delivery: ArgoCD (v2.7)
- Secrets Management: Sealed Secrets or Mozilla SOPS
Pro Tip: Don't blindly apply latest tags. Pin your versions. In yourproviders.tf, always lock the provider version to avoid breaking changes during aterraform apply.
Phase 1: Infrastructure as Code (IaC)
Before you deploy apps, you need the metal. Using Terraform, we define the environment. This is where hosting choice becomes architectural, not just financial.
When defining your backend in Terraform, ensure your state file is locked and encrypted. But more importantly, define your compute resources to match the workload.
resource "coolvds_instance" "k8s_worker" {
count = 3
region = "no-oslo-1"
image = "ubuntu-22.04"
flavor = "nvme.8cpu.32gb"
ssh_keys = [var.ssh_key_id]
# Critical for K8s performance
user_data = <<-EOF
#!/bin/bash
swapoff -a
modprobe overlay
modprobe br_netfilter
cat <<SYSCTL > /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.ipv4.ip_forward = 1
SYSCTL
sysctl --system
EOF
}
We specifically target the nvme.8cpu.32gb flavor here. Why? Because Kubernetes etcd is notoriously sensitive to disk latency. If your storage I/O creates a bottleneck, the API server starts timing out, and your GitOps operator (ArgoCD) fails to sync.
At CoolVDS, we built our KVM infrastructure on pure NVMe arrays precisely for this reason. We've seen clusters on standard SSDs spiral into "CrashLoopBackOff" simply because the disk couldn't keep up with the write-ahead logs. Low latency isn't a luxury; it's a dependency.
Phase 2: The Reconciliation Loop with ArgoCD
Once the cluster is up, install ArgoCD. It sits inside your cluster and watches your Git repository. When it detects a difference between the repo (Desired State) and the cluster (Actual State), it synchronizes them.
Here is a battle-tested Application manifest. Note the selfHeal policy.
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: production-payment-api
namespace: argocd
spec:
project: default
source:
repoURL: 'git@github.com:nordic-dev/payment-api.git'
targetRevision: HEAD
path: k8s/overlays/production
destination:
server: 'https://kubernetes.default.svc'
namespace: payments
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
Warning: selfHeal: true is aggressive. If someone manually changes a deployment scaling factor via kubectl, ArgoCD will immediately revert it. This enforces discipline. No manual tinkering allowed.
Phase 3: Handling Secrets without Getting Fired
The biggest pain point in GitOps is secrets. You cannot commit .env files to Git. In 2023, the most robust workflow involves Mozilla SOPS paired with age encryption or AWS KMS, or Bitnami's Sealed Secrets.
Here is how we use Sealed Secrets. You encrypt the secret on your laptop using the cluster's public key. The resulting hash is safe to commit to public repositories.
# 1. Create a raw secret (never commit this)
echo -n "super-secure-db-password" > db-pass.txt
kubectl create secret generic db-credentials \
--from-file=password=db-pass.txt \
--dry-run=client -o yaml > secret.yaml
# 2. Seal it (safe to commit)
kubeseal --controller-name=sealed-secrets-controller \
--controller-namespace=kube-system \
--format=yaml < secret.yaml > sealed-secret.yaml
# 3. Apply via GitOps
git add sealed-secret.yaml
git commit -m "Add DB credentials"
git push
When ArgoCD applies sealed-secret.yaml, the controller inside the cluster decrypts it back into a standard Kubernetes Secret.
Performance & Compliance: The "CoolVDS" Factor
You can have the cleanest GitOps pipeline in the world, but if the underlying metal is shaky, you will fail. Kubernetes adds overhead. The overlay networks (CNI), the sidecars, and the monitoring agents all consume resources.
In Norway, we also deal with strict data residency requirements. Hosting on hyperscalers often involves complex legal frameworks to ensure GDPR compliance. CoolVDS simplifies this. Our data centers are located in Oslo. Your data stays within Norwegian borders, subject to Norwegian law. This satisfies the "sovereignty" requirement that is becoming critical for enterprise clients.
Benchmarking I/O for K8s
We ran a fio benchmark on a standard CoolVDS instance versus a competitor's "cloud VPS" to simulate etcd load.
| Metric | Competitor Cloud | CoolVDS NVMe |
|---|---|---|
| Rand Write IOPS (4k) | 3,200 | 45,000+ |
| Latency (99th percentile) | 12ms | 0.4ms |
| Fsync Latency | Variable | Stable |
That 0.4ms latency is why our clusters recover from node failures in seconds, not minutes.
Final Thoughts: Automate the Pain Away
GitOps isn't just a trend; it's the maturity model for modern infrastructure. It provides an audit trail for compliance, a disaster recovery plan (just re-apply the git repo), and sleep assurance for your on-call engineers.
But software needs a home. Don't let slow I/O kill your SEO or application performance. You need VPS Norway solutions that understand the specific demands of container orchestration.
Ready to build a cluster that actually performs? Deploy a high-performance, KVM-based instance on CoolVDS today. We offer the raw power your reconciliation loops crave.