Stage 6, Part 5 of 9, RBAC, ServiceAccounts & Security

Text

PART 5: ARCHITECTURE & STRATEGY

23. Zero-Trust Kubernetes Architecture

text
┌─────────────────────────────────────────────────────────────┐
│                    ZERO-TRUST ARCHITECTURE                  │
│                                                             │
│  Identity                                                   │
│  ┌─────────────────────────────────────────────────────┐   │
│  │  • OIDC for humans                                  │   │
│  │  • SPIFFE/SPIRE for workloads                       │   │
│  │  • IRSA/Workload Identity for cloud                 │   │
│  │  • Bound ServiceAccount tokens (short-lived)        │   │
│  └─────────────────────────────────────────────────────┘   │
│                                                             │
│  Authorization                                              │
│  ┌─────────────────────────────────────────────────────┐   │
│  │  • RBAC (least privilege)                           │   │
│  │  • ValidatingAdmissionPolicy (CEL)                  │   │
│  │  • Kyverno/OPA for complex policies                 │   │
│  └─────────────────────────────────────────────────────┘   │
│                                                             │
│  Network                                                    │
│  ┌─────────────────────────────────────────────────────┐   │
│  │  • Default-deny NetworkPolicies                     │   │
│  │  • mTLS between all services (Istio, Linkerd)       │   │
│  │  • Egress restrictions                              │   │
│  └─────────────────────────────────────────────────────┘   │
│                                                             │
│  Runtime                                                    │
│  ┌─────────────────────────────────────────────────────┐   │
│  │  • Non-root, read-only rootfs                       │   │
│  │  • Drop ALL capabilities                            │   │
│  │  • seccomp RuntimeDefault                           │   │
│  │  • PSA restricted                                   │   │
│  │  • Falco/Tetragon detection                         │   │
│  └─────────────────────────────────────────────────────┘   │
│                                                             │
│  Supply Chain                                               │
│  ┌─────────────────────────────────────────────────────┐   │
│  │  • Signed images (cosign)                           │   │
│  │  • Verified at admission                            │   │
│  │  • SBOM generated                                   │   │
│  │  • SLSA provenance                                  │   │
│  └─────────────────────────────────────────────────────┘   │
│                                                             │
│  Data                                                       │
│  ┌─────────────────────────────────────────────────────┐   │
│  │  • Encryption at rest (etcd)                        │   │
│  │  • External secrets (Vault, ESO)                    │   │
│  │  • Audit logging to SIEM                            │   │
│  └─────────────────────────────────────────────────────┘   │
└─────────────────────────────────────────────────────────────┘

24. Multi-Tenant Security Architecture

Isolation LevelMechanism
SoftNamespaces + RBAC + NetworkPolicy + Quotas
MediumAbove + Pod Security Standards (restricted)
HardvCluster or separate clusters
StrongestSeparate clusters, separate cloud accounts

Namespace Isolation Checklist


25. Compliance & Security Frameworks

FrameworkK8s Requirement
PCI-DSSRBAC, audit logs, encryption, network segmentation
HIPAAAudit trails, access controls, encryption
SOC2Change management, monitoring, incident response
GDPRData residency, access controls, right to erasure
FedRAMPFIPS 140-2, SELinux, no privileged, STIG

CIS Kubernetes Benchmark (Key Items)


1:1 copy of the class Google Doc, code in code blocks.