User and operator guide · Deployment
Kubernetes Deployment
On this page
PurposeSupported 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 |
|---|---|---|
|
Common namespace, service account, runtime config, NetworkPolicy, and Atlas service workloads. |
Used by both demo and production overlays. |
|
Demo-local Postgres, Atlas Cache, RabbitMQ, and Vault support services. |
Local/demo support only unless the platform team explicitly accepts these components. |
|
Demo OIDC/SAML target applications, probe runner, and target app adapter. |
Demonstration and onboarding validation only. |
|
Local/demo-friendly Atlas deployment profile. |
May use generated or demo-only credentials and support services. |
|
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 |
|
Approved namespace name, quota, limit range, and restricted Pod Security admission labels. |
Secrets |
|
Environment-owned secret source or generated Kubernetes Secret manifest stored outside the repo with placeholders replaced. |
TLS and client CA |
|
Certificate issuer, trust bundle, rotation owner, and restore procedure. |
Storage |
|
Storage class, encryption, backup/snapshot policy, and restore test. |
Images |
|
GHCR path, tag or digest, SBOM/provenance evidence, scan result, and pull policy. |
Repository Assets
| Asset | Scope | What it provides | Review requirement |
|---|---|---|---|
|
Namespace baseline |
Legacy namespace baseline retained for compatibility. |
Use |
|
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. |
|
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. |
|
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 |
Security support layer |
Older Vault, SPIRE, OPA, monitoring, TrustAI, attestation, and kill-switch examples. |
Compatibility/reference only until reconciled with the supported overlay path. |
|
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
Deployment Order
| Phase | Command or asset | Gate before continuing |
|---|---|---|
Preflight |
Confirm |
Cluster-admin or delegated platform approval exists for the namespace and required CRDs/controllers. |
Namespace and policy shell |
|
Namespace is active, quotas are present, and restricted Pod Security labels are accepted. |
RBAC and security support |
|
ServiceAccounts exist, Vault is initialized by approved procedure, SPIRE workloads are registered, and OPA policies load. |
Stateful data plane |
|
PVCs bind, pods are ready, backup policy is documented, and credentials are sourced from approved secrets. |
Application services |
|
Readiness probes pass and service endpoints are populated. |
Ingress and monitoring |
|
TLS, client certificate policy, service routing, scrape targets, and dashboard access are verified. |
Validation and evidence |
|
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 |
|---|---|---|
|
Three replicas for staging availability. |
Confirm target namespace capacity and PDB behavior. |
|
Non-root pod security, filesystem group, and runtime default seccomp. |
Confirm rendered pods also set container-level restrictions. |
|
No privilege escalation, read-only root filesystem, and all Linux capabilities dropped. |
Validate with |
|
ClusterIP gRPC, metrics scraping, and optional external LoadBalancer. |
Review external exposure before enabling LoadBalancer. |
|
Ingress and egress policy intent. |
Confirm rendered NetworkPolicies match real service labels. |
|
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 |
|
Check namespace labels and rejected privileged workloads. |
Least-privilege service accounts |
|
Review Roles and RoleBindings; run |
Default-deny network stance |
|
Confirm |
Client TLS at ingress |
|
Validate ingress annotations, client CA secret, TLS version, and certificate chain. |
Workload identity |
|
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 |
|
Resolve quota, node selector, storage class, or PVC binding before retrying rollout. |
Readiness probe fails |
|
Capture logs, verify secret mounts and dependent services, then restart or roll back the workload. |
Ingress returns certificate or client-auth errors |
|
Verify TLS secret, client CA secret, DNS, and ingress-controller annotations. |
NetworkPolicy blocks expected traffic |
|
Compare service labels to policy selectors and record any temporary policy relaxation as a gap. |
Live validation skips checks |
|
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 |
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 |
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. |