User and operator guide · Deployment

Kubernetes Deployment

Status: currentReviewed: 2026-06-18Audience: platform engineers, deployment engineers, security engineers, SREs
On this pagePurposeSupported Kustomize Deployment PathOperator PrerequisitesRepository AssetsCluster TopologyDeployment OrderStep-By-Step Apply ProcedureStaging Helm PathBackup And RecoveryKubernetes Security ControlsValidation CommandsRollbackTroubleshootingEvidence ArtifactsKnown Review Items
Important

The Kubernetes assets are deployment starting points and validation anchors. They must be rendered, reviewed, and validated against the target cluster, storage class, ingress controller, image registry, certificate authority, secret manager, and monitoring stack before any production or mission claim is made.

Purpose

Kubernetes is the preferred deployment family when Atlas needs namespace controls, service discovery, rolling updates, stateful dependencies, RBAC, NetworkPolicy, observability, and repeatable platform operations.

Supported Kustomize Deployment Path

The supported Kubernetes path is Kustomize-based:

Path Purpose Operator expectation

k8s/base

Common namespace, service account, runtime config, NetworkPolicy, and Atlas service workloads.

Used by both demo and production overlays.

k8s/components/infrastructure

Demo-local Postgres, Atlas Cache, RabbitMQ, and Vault support services.

Local/demo support only unless the platform team explicitly accepts these components.

k8s/components/demo-targets

Demo OIDC/SAML target applications, probe runner, and target app adapter.

Demonstration and onboarding validation only.

k8s/overlays/demo

Local/demo-friendly Atlas deployment profile.

May use generated or demo-only credentials and support services.

k8s/overlays/prod

Production-oriented application profile with ingress and disruption budgets.

Requires environment-owned secrets, CA material, DNS, ingress, storage, and approval evidence.

Use the deploy script instead of applying files by hand:

scripts/deploy-atlas-k8s.sh --profile demo --tag main --dry-run --validate
scripts/deploy-atlas-k8s.sh --profile prod --namespace atlas --domain atlas.example.mil --tag vX.Y.Z --dry-run --validate

Expected result: rendered manifests, image-reference evidence, and resource-kind evidence are written under artifacts/deployment/kubernetes/<run-id>/.

To apply:

scripts/deploy-atlas-k8s.sh --profile demo --tag main --apply --wait --validate
scripts/deploy-atlas-k8s.sh --profile prod --namespace atlas --domain atlas.example.mil --tag vX.Y.Z --apply --wait --validate

The production command must only be used after the target environment has supplied approved secrets, TLS/CA material, storage, ingress, and external dependency evidence.

Operator Prerequisites

The operator must have a kubeconfig for the target cluster and permission to create or update the namespace, RBAC, secrets, StatefulSets, Deployments, Services, PVCs, Ingress, NetworkPolicies, and monitoring resources used by the selected manifests.

Preflight commands:

kubectl config current-context
kubectl auth can-i create namespace
kubectl auth can-i create statefulsets.apps -n trustscore
kubectl auth can-i create networkpolicies.networking.k8s.io -n trustscore
kubectl get storageclass
kubectl apply --dry-run=server -f k8s/namespace.yaml

Expected result: the context is the intended cluster, authorization checks return yes, the required storage class exists or the manifests have been adjusted, and the namespace manifest is accepted by the API server.

Required environment decisions before applying manifests:

Decision Manifest source Operator evidence

Namespace and labels

k8s/namespace.yaml

Approved namespace name, quota, limit range, and restricted Pod Security admission labels.

Secrets

k8s/secrets.yaml.example

Environment-owned secret source or generated Kubernetes Secret manifest stored outside the repo with placeholders replaced.

TLS and client CA

k8s/ingress.yaml, k8s/atlas-cache.yaml, k8s/rabbitmq-cluster.yaml, k8s/vault.yaml

Certificate issuer, trust bundle, rotation owner, and restore procedure.

Storage

k8s/pv.yaml, k8s/*StatefulSet volume claims

Storage class, encryption, backup/snapshot policy, and restore test.

Images

docker-bake.hcl, k8s/base, k8s/overlays/*

GHCR path, tag or digest, SBOM/provenance evidence, scan result, and pull policy.

Repository Assets

Asset Scope What it provides Review requirement

k8s/namespace.yaml

Namespace baseline

Legacy namespace baseline retained for compatibility.

Use k8s/base and overlays for the current supported path.

k8s/base

Service identity

Common service account, Atlas service workloads, runtime config, and default NetworkPolicy posture.

Review least privilege, service account separation, and target-environment policy before production.

k8s/overlays/prod/ingress.yaml

Ingress and NetworkPolicy

NGINX TLS annotations, optional client certificate auth, and frontend/API routing.

Replace sample hosts, certificate issuer, and client CA with environment-owned values.

k8s/components/infrastructure

Demo-local stateful support layer

Postgres, Atlas Cache, RabbitMQ, and Vault dev support.

Use only for demo/local validation unless the environment explicitly accepts these components.

Legacy root k8s/*.yaml

Security support layer

Older Vault, SPIRE, OPA, monitoring, TrustAI, attestation, and kill-switch examples.

Compatibility/reference only until reconciled with the supported overlay path.

deployments/staging/**

Staging deployment path

Staging manifests, Helm values, deployment, rollback, and validation scripts.

Treat as staging reference, not production defaults.

SPIRE server and agent manifests must be validated with the actual cluster socket path, node attestation method, service account bindings, and registration entries. See security:spiffe-mtls.html for the internal service identity model and evidence checklist.

Cluster Topology

Kubernetes Topology
Kubernetes TopologyArchitecture diagramOpen full size ↗

Deployment Order

Phase Command or asset Gate before continuing

Preflight

Confirm kubectl, cluster access, storage classes, ingress controller, DNS, image registry, secret manager, and NetworkPolicy support.

Cluster-admin or delegated platform approval exists for the namespace and required CRDs/controllers.

Namespace and policy shell

kubectl apply -f k8s/namespace.yaml

Namespace is active, quotas are present, and restricted Pod Security labels are accepted.

RBAC and security support

kubectl apply -f k8s/rbac.yaml, k8s/vault.yaml, k8s/spire-server.yaml, k8s/spire-agent.yaml, k8s/opa.yaml

ServiceAccounts exist, Vault is initialized by approved procedure, SPIRE workloads are registered, and OPA policies load.

Stateful data plane

k8s/atlas-cache.yaml, k8s/rabbitmq-cluster.yaml, k8s/oxigraph.yaml, persistent volumes.

PVCs bind, pods are ready, backup policy is documented, and credentials are sourced from approved secrets.

Application services

k8s/trustai-service.yaml, k8s/attestation-service.yaml, k8s/killswitch-service.yaml

Readiness probes pass and service endpoints are populated.

Ingress and monitoring

k8s/ingress.yaml, k8s/prometheus.yaml, k8s/grafana.yaml

TLS, client certificate policy, service routing, scrape targets, and dashboard access are verified.

Validation and evidence

deployments/staging/scripts/validate-staging.sh, ./scripts/run-security-validation.sh --live

Validation logs are retained and skipped checks are documented.

Step-By-Step Apply Procedure

Use this procedure for the supported Kustomize overlays after replacing sample values with environment-approved values.

RUN_ID="$(date -u +%Y%m%d-%H%M%S)-kubernetes"
EVIDENCE_DIR="artifacts/deployment/kubernetes/$RUN_ID"
mkdir -p "$EVIDENCE_DIR"

scripts/deploy-atlas-k8s.sh \
  --profile prod \
  --namespace atlas \
  --domain atlas.example.mil \
  --tag vX.Y.Z \
  --dry-run \
  --validate \
  --evidence-dir "$EVIDENCE_DIR/render"

# After environment-owned secrets, TLS, CA, ingress, storage, and approval evidence are ready:
scripts/deploy-atlas-k8s.sh \
  --profile prod \
  --namespace atlas \
  --domain atlas.example.mil \
  --tag vX.Y.Z \
  --apply \
  --wait \
  --validate \
  --evidence-dir "$EVIDENCE_DIR/apply"

Wait for workload readiness:

kubectl rollout status deployment -n atlas --timeout=600s
kubectl rollout status statefulset -n atlas --timeout=600s || true

Expected result: rollouts complete, pods are Running and ready, PVCs are Bound, ingress references the expected host and TLS secret, and NetworkPolicies include default-deny-all plus only the intended allow rules.

Capture troubleshooting evidence before changing the cluster again:

kubectl describe pods -n trustscore >"$EVIDENCE_DIR/logs/pod-describe.txt"
kubectl logs -n trustscore -l app=attestation-service --all-containers --tail=500 >"$EVIDENCE_DIR/logs/attestation-service.log"
kubectl logs -n trustscore -l app=trustai-engine --all-containers --tail=500 >"$EVIDENCE_DIR/logs/trustai-engine.log"
kubectl logs -n trustscore -l app=atlas-cache --all-containers --tail=500 >"$EVIDENCE_DIR/logs/atlas-cache.log"

Staging Helm Path

The staging Helm values in deployments/staging/helm/values.yaml currently focus on the kill-switch deployment and related services. They include:

Setting group Current intent Review point

killswitch.replicaCount

Three replicas for staging availability.

Confirm target namespace capacity and PDB behavior.

killswitch.securityContext

Non-root pod security, filesystem group, and runtime default seccomp.

Confirm rendered pods also set container-level restrictions.

killswitch.containerSecurityContext

No privilege escalation, read-only root filesystem, and all Linux capabilities dropped.

Validate with kubectl get pod -o yaml after deployment.

services.grpc, services.metrics, services.external

ClusterIP gRPC, metrics scraping, and optional external LoadBalancer.

Review external exposure before enabling LoadBalancer.

networkPolicy.enabled

Ingress and egress policy intent.

Confirm rendered NetworkPolicies match real service labels.

monitoring.serviceMonitor

Prometheus ServiceMonitor intent.

Requires the target cluster to provide the ServiceMonitor CRD.

Backup And Recovery

Kubernetes recovery depends on the target cluster’s storage, secret manager, registry, and managed database choices. Before promotion, document PVC snapshot strategy, database recovery point, Vault or secret-manager recovery procedure, rendered manifest hashes, ingress certificate restore, and post-restore live validation. Use Backup And Recovery: Kubernetes Runbook as the operations checklist.

Kubernetes Security Controls

Control Manifest source Validation method

Restricted pod security

k8s/namespace.yaml

Check namespace labels and rejected privileged workloads.

Least-privilege service accounts

k8s/rbac.yaml

Review Roles and RoleBindings; run kubectl auth can-i probes for service accounts.

Default-deny network stance

k8s/ingress.yaml

Confirm default-deny-all is active and required allow policies admit only intended traffic.

Client TLS at ingress

k8s/ingress.yaml

Validate ingress annotations, client CA secret, TLS version, and certificate chain.

Workload identity

k8s/spire-server.yaml, k8s/spire-agent.yaml

Verify SPIRE registration entries and workload SVID issuance.

Secret injection

Vault annotations in service manifests

Confirm Vault roles, policies, token TTLs, and injected secret paths in the target environment.

Runtime health

Liveness, readiness, startup probes

Run rollout status and inspect failed probe logs.

Validation Commands

kubectl get namespace trustscore
kubectl get pods -n trustscore -o wide
kubectl get svc -n trustscore
kubectl get networkpolicy -n trustscore
kubectl get ingress -n trustscore

bash deployments/staging/scripts/validate-staging.sh
ATLAS_BASE_URL=https://<validated-gateway> ./scripts/run-security-validation.sh --live

For an evidence-bearing run, bind the validation output to the same deployment run ID:

REPORT_ROOT="$EVIDENCE_DIR/security-validation" \
  ATLAS_BASE_URL=https://<validated-gateway> \
  ./scripts/run-security-validation.sh --live 2>&1 | tee "$EVIDENCE_DIR/security-validation.console.log"

Expected result: /health returns healthy or degraded only where documented, required live checks pass, and any skipped optional checks are listed in the evidence package as unsupported claims.

Rollback

For application Deployments, use Kubernetes rollout history:

kubectl rollout history deployment/attestation-service -n trustscore
kubectl rollout undo deployment/attestation-service -n trustscore
kubectl rollout status deployment/attestation-service -n trustscore --timeout=300s

For StatefulSets and data services, do not delete PVCs as a routine rollback. Restore from the approved storage or database recovery procedure, then rerun health and validation commands. If a manifest apply introduced the failure, apply the previous reviewed manifest and capture the new status:

kubectl apply -f <previous-reviewed-manifest>.yaml
kubectl get pods,pvc,svc,ingress -n trustscore -o wide >"$EVIDENCE_DIR/rollback/post-rollback-status.txt"

For the staging kill-switch path, use the repository rollback helper:

deployments/staging/scripts/rollback-staging.sh status
deployments/staging/scripts/rollback-staging.sh history
deployments/staging/scripts/rollback-staging.sh rollback-previous

Expected result: the target workload returns to ready replicas, service endpoints are populated, and live validation is rerun before the rollback is considered complete.

Troubleshooting

Symptom Command Disposition

Pods stuck pending

kubectl describe pod -n trustscore <pod-name> and kubectl get pvc -n trustscore

Resolve quota, node selector, storage class, or PVC binding before retrying rollout.

Readiness probe fails

kubectl logs -n trustscore <pod-name> --all-containers --tail=200

Capture logs, verify secret mounts and dependent services, then restart or roll back the workload.

Ingress returns certificate or client-auth errors

kubectl describe ingress trustscore-ingress -n trustscore

Verify TLS secret, client CA secret, DNS, and ingress-controller annotations.

NetworkPolicy blocks expected traffic

kubectl get networkpolicy -n trustscore -o yaml

Compare service labels to policy selectors and record any temporary policy relaxation as a gap.

Live validation skips checks

rg -n "Skipping{vbar}may skip" "$EVIDENCE_DIR/security-validation"

Do not claim skipped behavior until required variables and evidence are present.

Evidence Artifacts

Keep these artifacts with the deployment record:

  • rendered manifests from kubectl get …​ -o yaml

  • namespace, RBAC, NetworkPolicy, ingress, service, pod, and PVC status

  • rollout history and rollout status output

  • application, cache, broker, Vault, SPIRE, OPA, and ingress logs needed to explain failures

  • secret custody record without secret values

  • storage backup/snapshot and restore evidence

  • live validation logs and skipped-check disposition

Known Review Items

Item Why it matters

Manifest identifiers

Several Kubernetes assets retain trustscore namespace, labels, image names, or hostnames. Treat these as current implementation identifiers and decide whether target environments require Atlas-specific names.

Resource sizing

Some example resource requests and limits are intentionally small for staging or sample manifests. Size them through load testing.

Certificate issuer

Sample ingress annotations reference cert-manager issuers and local hostnames. Replace with environment-owned PKI and DNS.

Storage class

TrustAI graph data references fast-ssd. Confirm the class exists and meets encryption, backup, and performance requirements.

External services

Vault, SPIRE, OPA, Atlas Cache, RabbitMQ, and monitoring can be deployed from repo assets or supplied by the platform. Record ownership either way.