Skip to main content

Phase 1: Infrastructure Migration

Migrate the cluster's ingress layer from NGINX to Traefik, deploy the foundational data stores (Keycloak, SpiceDB, ClickHouse, Elasticsearch), and ensure all subdomains resolve to the cluster.

Prerequisites

  • Phase 0 -- The documentation site must be deployed so that runbooks and architecture diagrams are available during infrastructure work.

Blocks

IDBlockDescriptionAcceptance Criteria
1.1Add DNS A records for all subdomains in Route53Create A records in AWS Route53 for app, api, admin, keycloak, grafana, gitlab, wazuh, and doc subdomains, all pointing to the cluster's external IP.dig +short <subdomain>.redactedworld.com returns the cluster IP for every subdomain.
1.2Install Traefik, remove NGINX ingressDeploy Traefik via Helm chart with TLS termination (Let's Encrypt / cert-manager), then remove the NGINX ingress controller and its resources.Traefik pods are Running; NGINX ingress pods are gone; existing sites remain reachable through Traefik.
1.3Deploy KeycloakDeploy Keycloak with a PostgreSQL-backed realm (redactedworld), admin console on keycloak.redactedworld.com, and initial client registrations for the API Gateway and Angular frontend.Keycloak admin console is reachable; a test user can authenticate via the redactedworld realm.
1.4Deploy SpiceDBDeploy SpiceDB (Authzed) with a PostgreSQL datastore and load the initial permissions schema defining user, organization, domain, and scan object types.zed schema read returns the loaded schema; zed permission check succeeds for a test tuple.
1.5Deploy ClickHouseDeploy a single-node ClickHouse instance with persistent storage, create the scans and events databases, and configure retention policies.clickhouse-client --query "SHOW DATABASES" lists scans and events; inserts and queries succeed.
1.6Deploy ElasticsearchDeploy a single-node Elasticsearch 8 instance with persistent storage and create index templates for scan reports and forum posts.curl -s http://elasticsearch:9200/_cluster/health returns "status":"green" or "status":"yellow"; index templates are listed.
1.7Migrate ingress rules to Traefik IngressRoutesConvert every existing NGINX Ingress resource to a Traefik IngressRoute CRD with TLS passthrough or termination as appropriate.All previously routed services respond correctly through Traefik; no NGINX Ingress resources remain.
1.8Provision additional worker nodesAdd worker nodes (or increase node pool size) to handle the expected workload from scan jobs and data stores.kubectl get nodes shows the new nodes in Ready state; resource headroom is sufficient for Phase 2+.

Estimated Scope

AreaFiles / Resources
DNSAWS Route53 hosted zone for redactedworld.com
Helm chartstraefik/, keycloak/, spicedb/ (values files in k8s/)
Kubernetes manifestsk8s/clickhouse/, k8s/elasticsearch/, k8s/traefik/
SpiceDB schemaauthz/schema.zed
Cert-managerk8s/cert-manager/clusterissuer.yaml
Node poolsCloud provider console or IaC (Terraform / Pulumi)