Agent Running
    Agency 42
    Kubernetes

    Kubernetes – what it is, why you need it, and when (NOT) to use it

    Agency 42 has CKA-certified expertise (Certified Kubernetes Administrator).

    TL;DR

    Kubernetes (K8s) is an open-source platform for container orchestration. It runs your applications in clusters, scales them automatically, restarts when something fails, and rolls out new versions without downtime. You can run it in the cloud, on-prem, or hybrid, with everything from "vanilla" open source to fully managed services like AKS/EKS/GKE. It's powerful – but not free in complexity.

    What is Kubernetes? (The Basics — Pods, Deployments, Services)

    Kubernetes automates operations of containerized applications. You describe the desired state in YAML/JSON (e.g., "3 replicas of this web app, expose port 443, autoscale between 3–10"). Kubernetes then ensures reality matches the declaration.

    Key concepts:

    • Pod – Pod – smallest runnable unit (one or more containers that belong together).
    • Deployment/StatefulSet – Deployment/StatefulSet – how new versions are rolled out and how replicas are managed (stateless vs stateful).
    • Service – Service – stable name/IP that load balances to the right Pods.
    • Ingress/Gateway – Ingress/Gateway – exposes services externally (HTTP/TLS, routing, etc.).
    • ConfigMap/Secret – ConfigMap/Secret – configuration and secrets.
    • HPA/VPA/KEDA – HPA/VPA/KEDA – autoscaling based on CPU, memory, or custom/external metrics and events.

    Kubernetes Variants (from "vanilla" to fully managed)

    There isn't "one" Kubernetes, but several ways to consume the platform:

    1) Upstream/"vanilla" (open source)

    You install and operate yourself (e.g., kubeadm, Cluster API, kind for local).

    Maximum freedom, but you're responsible for upgrades, security, networking, and storage.

    2) Managed Kubernetes in the cloud

    AKS (Azure Kubernetes Service), EKS (AWS), GKE (Google Cloud).

    The cloud provider manages the control plane, you manage worker nodes and applications.

    Advantages: quick start, integrated networking/storage/monitoring, SLA.

    Disadvantage: Disadvantage: some vendor lock-in through surrounding resources (IAM, networking, load balancers).

    3) Enterprise distributions & on-prem platforms

    Red Hat OpenShiftSUSE Rancher

    Red Hat OpenShift, SUSE Rancher/RKE2, VMware Tanzu, Mirantis.

    Ready packaging with policy, multi-cluster, SSO, registries, network and security profiles. Good for large organizations, compliance, and hybrid/edge.

    4) Edge/IoT and lightweight

    K3s (Rancher/SUSE), (Canonical). MicroK8s Reduced footprint for edge nodes, labs, CI, and smaller use cases.

    5) Serverless-on-Kubernetes

    Knative for event-driven and on-demand scale-to-zero.

    Gives "functions feel" but with full control in your own cluster.

    Why use Kubernetes?

    • Portability & standardization – same deployment model in cloud, on-prem, and hybrid.
    • Scaling & high availability – autoscaling, self-healing pods, rolling upgrades.
    • DevOps/GitOps-friendly – declarative manifests, pipelines, policy as code.
    • Ecosystem – huge set of tools (observability, policy, service mesh, CI/CD).
    • Cost control – better resource utilization compared to VMs, especially with varying load.

    Disadvantages and common pitfalls

    • Complexity – steep learning curve (networking, storage, security, right sizing).
    • Operational responsibility – even with managed, you need to understand observability, policy, backup/restore.
    • Over-qualified for simple services – static sites and small apps can become more expensive/complex than PaaS.
    • Shadow of cloud dependencies – if you use cloud-native resources (LB, IAM, storage), portability decreases.

    Architecture and key building blocks (what you actually need)

    • Container registry: Container registry: e.g., GHCR/GAR/ECR/ACR or own Harbor.
    • Ingress: Ingress: NGINX Ingress, Contour/Envoy, or cloud-native gateways/LB.
    • Observability: Observability: Prometheus + Grafana, OpenTelemetry, tracing with Jaeger/Tempo.
    • Policy & security: Policy & security: OPA Gatekeeper or Kyverno, image scanning (Trivy), Sigstore/Cosign.
    • Secrets: Secrets: External Secrets Operator, Sealed Secrets, or integration with Vault/Key Vault/SM.
    • Network & service mesh: Network & service mesh: Cilium (eBPF), Calico; mesh: Istio or Linkerd.
    • CI/CD & GitOps: CI/CD & GitOps: Argo CD / Flux, pipelines in GitHub Actions, Tekton, Jenkins, Azure DevOps.
    • Scaling: Scaling: HPA/VPA, Cluster Autoscaler, event-driven KEDA.

    When does Kubernetes fit?

    Yes, use K8s when…

    • you have multiple services/microservices that need to scale independently,
    • you want fast, secure releases (blue/green, canary, progressive delivery),
    • you want to standardize dev–prod and be able to run multi-cloud/hybrid,
    • you need observability and policy for real (compliance, traceability).

    Consider something simpler when…

    • it's a single small app without scaling/HA requirements,
    • the team lacks time/ability to manage the platform (then PaaS might be better),
    • latency/edge requirements are extremely specific (where K3s/MicroK8s or pure edge service might be more appropriate).

    Costs – direct and indirect

    • Cluster cost: nodes (compute + storage + network), LB, egress, snapshots.
    • Operations & tools: monitoring, log management, registry, security.
    • Team time: competence, on-call, upgrades, policy work.

    Tip: start small and managed (AKS/EKS/GKE), standardize with GitOps, add components as needed.

    Migration – the path into K8s without drama

    1. Containerize applications (minimal possible change).
    2. Set up CI/CD + image scanning + signing early.
    3. Add observability (metrics, logs, traces) before production.
    4. Introduce policy (RBAC, network policies, Gatekeeper/Kyverno) before onboarding more teams.
    5. Practice rollbacks and disaster recovery.

    FAQ (quick for decision-makers)

    Is Kubernetes secure?

    Yes, with proper RBAC, network policies, signing, and scanning. On top of that: secrets management (ESO/Vault) and runtime protection (Falco).

    How future-proof is it?

    Kubernetes is the de facto standard for container orchestration and is driven by the CNCF community and all major cloud providers.

    Can we be cloud-agnostic?

    Yes – if you avoid heavy cloud-specific extensions. Standardize around Ingress, CSI/CSM drivers, and keep IaC separate.

    Summary

    Kubernetes is a powerful standard platform for running modern applications at scale. It provides portability, robustness, and faster releases – but requires discipline and competence. Start simple, choose managed where possible, lay the foundation with GitOps, observability, and policy, and scale from there.

    Related Services

    AI platforms