Sachin Chaurasiya

Path 09 · learning path

Platform Engineering

Assembling an internal platform for a Kubernetes-hosted service from parts already built on this site: the contract between the platform team and the teams that ship on it, environments generated from Git with Argo CD ApplicationSets, a versioned GitLab CI template as the golden delivery path, Kyverno guardrails delivered through GitOps, and a Prometheus, Grafana and Loki stack to see what runs.

Parts
5 parts
Total reading time
~1.3 h to read
Difficulty
intermediate

What you will learn

  • Write down what the platform provides, what it deliberately does not, and where the golden path ends and enforcement begins
  • Generate one Argo CD Application per environment from config files in Git, with a manual gate on production and safe deletion
  • Publish a versioned pipeline template with inputs and extension points, and know what an include can and cannot enforce
  • Deliver baseline and production guardrails with Argo CD, roll them out audit-first, and grant scoped exceptions that expire
  • Stand up metrics, logs and a triage dashboard on kind and diagnose a real restart loop from all three

Before you start

Knowledge assumed

  • CI/CD fundamentals: pipelines, artifacts and deployments (the CI/CD Engineering path, or equivalent)
  • Kubernetes basics (Deployments, Services, namespaces) and Git
  • GitOps with Argo CD: part 3 of Secure Kubernetes covers the install and AppProject the ApplicationSet part assumes
  • Builds on CI/CD Engineering and Secure Kubernetes

Hands-on environment

  • Docker, Helm 4 and kind 0.31 for the hands-on parts
  • gitlab-ci-local, to run the pipeline template without a GitLab project

Each part names what it needs. Nothing has to be installed before part 1.

The path

5 parts, in order

Each part states what it assumes from the previous one, so you can also jump in where your setup already is.

  1. Part 1 of 5 Start here

    Platform Engineering Foundations: Defining the Platform Contract

    The operating model behind the CI templates, ApplicationSets, Kyverno guardrails and observability stack on this site: what a team hands over, what the platform returns, where the golden path ends and enforcement begins.

    DevOps intermediate 11 min read
  2. Part 2 of 5

    Argo CD ApplicationSets for Multi-Environment Delivery

    Replace hand-copied Argo CD Applications with an ApplicationSet driven by per-environment config files: the Git file generator, templatePatch for automated versus manual sync, AppProject boundaries and deletion policy.

    CI/CD intermediate 14 min read
  3. Part 3 of 5

    Reusable GitLab CI Templates and Components: A Golden Delivery Path

    One platform-owned GitLab CI template instead of a pipeline per repository: spec:inputs with validation, a consumer that includes it by project and tag, extension points, versioning, and what a consumer can override.

    CI/CD intermediate 14 min read
  4. Part 4 of 5

    Platform Guardrails with Kyverno and GitOps

    Kyverno as a platform guardrail system: baseline and production policy layers keyed on namespace labels, delivered by Argo CD from one repository, rolled out audit-first, with scoped expiring exceptions.

    DevOps intermediate 17 min read
  5. Part 5 of 5

    Kubernetes Observability with Prometheus, Grafana and Loki

    kube-prometheus-stack, Loki in single-binary mode and Alloy on a kind cluster; the PromQL and LogQL that answer operational questions; low-cardinality log labels; a real OOM restart loop diagnosed end to end.

    Observability intermediate 21 min read

Practise

Labs that exercise this path

All labs →
Lab

Enforce Pod Security with Pod Security Admission and Kyverno

On a kind cluster, turn on the restricted Pod Security profile for a namespace, watch it reject a default pod, then add a Kyverno ValidatingPolicy in Audit mode, read the PolicyReport, and switch it to Deny.

intermediate 45 minutes Kubernetes · Kyverno
Lab

Least-Privilege Kubernetes RBAC for a Deployer Service Account

Create a service account that can roll out Deployments in one namespace and nothing else, prove the boundary with impersonation and a real short-lived token, and audit the cluster for wildcard roles and anonymous access.

intermediate 35 minutes Kubernetes

Toolchain

Tool profiles used in this path

All tools →
deploy Orchestration

Kubernetes

Container orchestration platform and the deployment target for most of the toolchain.

deploy GitOps delivery

Argo CD

Declarative GitOps continuous delivery controller for Kubernetes.

code DevSecOps platform

GitLab

Source control, merge requests and CI/CD in one platform, with built-in security scanning templates.

protect Admission policy

Kyverno

Kubernetes-native policy engine: validate, mutate, generate and verify images with YAML.

observe Metrics & alerting

Prometheus

Pull-based metrics collection, storage and alerting with PromQL.

observe Visualisation

Grafana

Dashboards and alerting across metrics, logs and traces.

observe Log aggregation

Loki

Log aggregation that indexes labels, not content, for cost-efficient storage.