🔵 Compute Engine & GKE
Virtual Machines, Instance Groups, Kubernetes Engine
💻 Compute Engine (GCE)
VM instancelar. Machine types: General Purpose (N2, E2), Compute Optimized (C2), Memory Optimized (M2). Persistent Disk: Standard (HDD), SSD, Balanced. Preemptible VM — 80% arzon, 24 soatda to'xtatiladi. Spot VM — Preemptiblega o'xshash, lekin cheksiz davom etadi.
📦 Instance Groups
Managed Instance Group (MIG) — avtomatik auto-healing, auto-scaling, rolling update. Unmanaged IG — manual boshqaruv. MIG + HTTP(S) Load Balancer = production-ready setup.
⎈ Google Kubernetes Engine (GKE)
Managed Kubernetes. Cluster modes: Standard (node boshqarish sizda) va Autopilot (to'liq managed). Node Pool — bir xil konfiguratsiyali nodelar to'plami. Workload Identity — GKE workloads uchun GCP IAM integration.
🔄 GKE Deployment Strategiyalari
Rolling Update — asta-sekin yangilash, zero downtime. Blue/Green — yangi version parallel run, switch. Canary — oz qism trafikni yangi versiyaga yo'naltirish. kubectl: get, describe, apply, delete asosiy buyruqlar.
💡 Asosiy nuqtalar
- Preemptible/Spot VM: arzon, lekin interrupt bo'lishi mumkin
- MIG: auto-scaling + auto-healing
- GKE Autopilot: node pool boshqarishsiz
- Workload Identity: Service Account o'rniga GKE-native auth
- PersistentVolume GKE da disk kabi ishlaydi
📋 Kod misoli
# GKE cluster yaratish
gcloud container clusters create my-cluster \
--zone us-central1-a \
--num-nodes 3 \
--machine-type e2-medium
# kubectl asosiy buyruqlar
kubectl get pods -n default
kubectl apply -f deployment.yaml
kubectl describe pod my-pod
kubectl logs my-pod --tail=50
kubectl scale deployment my-app --replicas=5
🎯 Imtihon maslahatlari
- Preemptible VM max 24 soat, Spot VM cheksiz — lekin ikkisi ham interrupt bo'lishi mumkin
- MIG (Managed) vs UIG (Unmanaged): imtihonda "auto-healing" yoki "auto-scaling" kerak bo'lsa → MIG
- GKE Standard: node pool boshqarasiz, Autopilot: Google boshqaradi — "fully managed Kubernetes" = Autopilot
- Persistent Disk Regional — ikki zonada replikatsiya (high availability uchun)
- `kubectl rollout undo` — deployment ni oldingi versiyaga qaytarish (exam da tez-tez chiqadi)
⚠️ Ko'p adashadigan
- Spot VM = Preemptible VM deb o'ylash — Spot VM da 24 soat cheklov yo'q, lekin interrupt bo'lishi mumkin
- GKE Autopilot da node pool manually boshqarish mumkin deb o'ylash — Autopilot da node pool Google boshqaradi
- MIG "stateful" va "stateless" farqini bilmaslik — stateful MIG disk va IP saqlaydi, stateless saqlmaydi
🧠 Eslab qolish: "MIG = Magic Instance Group": Auto-Heal + Auto-Scale + Load Balance. "SNAP" = Standard (nodes you manage), gkE Autopilot (nodes Google manages)
Compute Engine & GKE bo'yicha o'zingizni sinab ko'ring
Bepul interaktiv quiz, mock imtihon va to'liq darslar — CertMaster platformasida.
Bepul boshlash →