Terminal prompt logo for Ali Haidry — alihaidry.dev~/AHAli Haidryalihaidry.dev
Complete · 6 of 6 phases

PakTech ChatDevSecOps on Azure Kubernetes

A real-time chat app taken from local development to a hardened Azure platform: infrastructure as code, GitOps delivery, a secured CI/CD pipeline, runtime security and observability. Built and run for real, with the problems left in. The lab cluster was decommissioned in November 2026 and can be rebuilt from Terraform and GitOps. Six phases, one page each: what I built, the commands, how a change flows, what broke and why I chose this over the alternatives.

Tech stack used
Azure AKSTerraformArgo CDGitHub ActionsTrivyOPA GatekeeperFalcoPrometheusGrafanaDockerFastAPINext.jsPostgreSQLRedis

The phases

Read them in order. Each one builds on the last.

  1. Local development

    Published

    Run the whole app on a laptop, hardened and tested, before any cloud is involved.

    FastAPINext.jsPostgreSQLRedisDocker Composepre-commit
  2. Infrastructure with Terraform

    Published

    Create the Azure platform as code: cluster, registry, vault and identity, with remote state.

    AKSACRKey VaultWorkload IdentityAzure DNSBlob state
  3. GitOps with Argo CD

    Published

    Make Git the source of truth: Argo CD deploys dev, staging and prod, with Gateway API and automatic TLS in front.

    Argo CDApp of appsEnvoy Gatewaycert-managerHPANetwork Policies
  4. CI/CD and DevSecOps

    Published

    A pipeline that tests, scans and ships: GitHub Actions with OIDC, security gates and a manual production approval.

    GitHub ActionsOIDCTrivySemgrepCheckovBranch protection
  5. Runtime and cluster security

    Published

    Assume an attacker gets a foothold and limit the damage: a locked-down control plane, admission policy, hardened pods, controlled egress and runtime detection.

    GatekeeperEgress policiesRead-only filesystemImage digestsFalcoTrivy Operator
  6. Observability

    Published

    See what the system is doing: metrics, dashboards and alerts that tell you before users do.

    PrometheusGrafanaAlertManagerSlack alertsMultiprocess metrics
What you will build
  • A chat app that runs locally and on Azure
  • The platform as code, deployed from Git
  • A pipeline with security gates
  • A cluster that limits what an intruder can do
Prerequisites
  • An Azure subscription
  • Git and a GitHub account
  • Basic Docker and Kubernetes
  • A terminal you are comfortable in
How to follow along
  • Read the phases in order
  • Run the commands in a dev environment first
  • Check the Issues block before you start
  • Code lives in the two repositories linked below