Kubernetes Sahada: Bir Üretim Şirketinin AKS Adoption Yolculuğu — Workshop'tan Production'a 9 Aylık Süreç ve Maliyet Karşılaştırma

Erzurum merkezli, 12 fabrikası olan bir tarım makinesi üretim grubu, “her fabrikada ayrı IIS server’larında çalışan 22 .NET uygulaması artık yönetilemez” dediği gün AKS adoption başladı. 9 ay sonra 22 uygulama tek AKS cluster’da, %58 daha az altyapı maliyeti. Bu yazı sahadaki notları aktarıyor.

Kubernetes Neden? AKS Avantajları

Konu IIS / VM Bazlı AKS (managed K8s)
Deploy birim VM + IIS site Container + Pod
Auto-scale Manuel veya VMSS HPA + Cluster Autoscaler
Self-healing Yok (manuel restart) Pod restart otomatik
Rolling deploy Manuel Built-in (zero downtime)
Service discovery DNS / hardcode Service + DNS otomatik
Resource utilization %~~15-25 (VM düşük) %~~55-75 (bin pack)
Yönetim yükü (control plane) Yüksek Microsoft yönetir (managed)
Patch / upgrade Manuel her VM Cluster upgrade tek komut

9 Aylık Yol Haritası

Ay Aşama
1 Ekip eğitim (3 günlük workshop) + POC AKS dev cluster
2 İlk app: small portal app → containerize → AKS dev
3 CI/CD pipeline (Azure DevOps + ACR + AKS)
4 Production AKS cluster + networking (Azure CNI)
5 İkinci app + Ingress (App Gateway + AGIC)
6 Observability (Prometheus + Grafana + Container Insights)
7 5 app daha + GitOps (Flux v2)
8 Geri kalan 14 app (batch wave)
9 Eski IIS sunucu emekliye, optimization

AKS Cluster Tasarımı

Region: West Europe
Network: Azure CNI Overlay
  - VNet: 10.20.0.0/16
  - Subnet: 10.20.10.0/24 (node)
  - Pod CIDR: 10.244.0.0/16
  - Service CIDR: 10.96.0.0/16

Node pool'lar:
  - systempool: 3× D2s_v5 (system workload, addon)
  - userpool: 4-12× D4s_v5 (auto-scale, user app)
  - batchpool: 0-8× D8s_v5 (spot, batch job, gece)

Control plane:
  - Free SKU (POC) → Standard SKU (production, 99.95% SLA)
  - API server private (private cluster)

Add-on:
  - Azure Monitor / Container Insights
  - Azure Policy (compliance)
  - Application Gateway Ingress Controller (AGIC)
  - Microsoft Defender for Containers

Multi-Tenant Namespace İzolasyonu

# Her fabrika kendi namespace'i
apiVersion: v1
kind: Namespace
metadata:
  name: fabrika-erzurum
  labels:
    pod-security.kubernetes.io/enforce: restricted
    plant: erzurum
---
# Resource quota (kaynak limit)
apiVersion: v1
kind: ResourceQuota
metadata:
  name: erzurum-quota
  namespace: fabrika-erzurum
spec:
  hard:
    requests.cpu: "8"
    requests.memory: 16Gi
    limits.cpu: "16"
    limits.memory: 32Gi
    persistentvolumeclaims: "10"
---
# Network policy (izolasyon)
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: deny-cross-namespace
  namespace: fabrika-erzurum
spec:
  podSelector: {}
  policyTypes: [Ingress]
  ingress:
  - from:
    - namespaceSelector:
        matchLabels: { plant: erzurum }
    - namespaceSelector:
        matchLabels: { name: ingress-nginx }

GitOps (Flux v2)

Repo yapısı:
  k8s-config/
  ├── clusters/
  │   ├── prod/
  │   │   ├── flux-system/
  │   │   ├── infrastructure/
  │   │   └── apps/
  │   │       ├── erzurum/
  │   │       ├── kayseri/
  │   │       └── ...

Flux:
  - Git repo'yu izler (her 1 dk)
  - Değişiklik tespit → cluster'a apply
  - Drift detection (manuel kubectl apply izinsiz → revert)
  - Multi-cluster sync (prod + dr)

Avantaj:
  - Audit (Git log = deploy log)
  - Rollback = git revert
  - PR review = approval gate

Observability Stack

Katman Tool
Metrics Prometheus + Grafana (charts)
Logs Container Insights (Azure Monitor)
Tracing OpenTelemetry → Application Insights
Alerting Alertmanager + PagerDuty
Dashboard Grafana (40+ panel)

Maliyet Karşılaştırma

Kalem Önce (22 IIS VM) Sonra (AKS)
VM compute (Azure / on-prem mix) ~~$3.400/ay ~~$1.180/ay (1 cluster)
SQL DB (mevcut) ~~$680/ay ~~$680/ay
Load balancer + IP ~~$220/ay ~~$120/ay
Backup (her VM) ~~$180/ay ~~$60/ay (Velero K8s)
Monitoring ~~$120/ay (System Center) ~~$95/ay (Container Insights)
Patch / IT effort ~~28 saat/ay ~~6 saat/ay
Toplam altyapı ~~$4.600/ay ~~$2.135/ay

Tasarruf: ~%~~54 altyapı + ~%~~78 IT effort.

Kubernetes Danışmanlık Hizmetleri

Faz Hizmet
Assessment Mevcut workload analizi, K8s uygunluk değerlendirme
Architecture Cluster topology, network, security tasarım
Migration Containerization (Dockerfile), manifest yazımı
Setup AKS provision, networking, RBAC, GitOps
Operation Day-2 operations, monitoring, upgrade strategy
Training Geliştirici + DevOps eğitim
Optimization Cost, performance, security hardening

Sahada Düşülen Üç Tuzak

  1. Eğitim olmadan production AKS: Geliştirici “container ne demek” bilmeden deploy → patlama. Önce 3 günlük workshop + POC.
  2. Tek namespace’a hepsini doldurmak: 22 app tek namespace = network policy yok = kaos. Her app/grup ayrı namespace + ResourceQuota şart.
  3. Cluster upgrade’i ertelemek: K8s versiyon her 4 ayda bir, AKS desteği 12-14 ay. Erteleme = upgrade kâbusu. Quarterly upgrade plan.

CloudSpark olarak Kubernetes (AKS) assessment, migration, GitOps tasarımı, multi-tenant namespace izolasyonu, observability ve danışmanlık hizmetleri sunuyoruz.

Etiketler:
🇹🇷 Türkçe🇬🇧 English🇩🇪 Deutsch🇫🇷 Français🇸🇦 العربية🇷🇺 Русский🇪🇸 Español