69

A Cluster From Hardware to Service Accounts

Trace one enterprise AI workflow request from a physical machine to a pod, then prove which identity that pod can use.

The enterprise problem and today’s slice

Enterprise problem: Teams call a cluster “a group of servers,” then grant a workload broad credentials or mistake a managed control plane for the machines that execute customer work; the result is either an outage with no clear layer or an avoidable data-access incident.

Whole-course context: The incoming evidence is a running managed-cluster workload with a customer request, a pod UID, and a provider resource ID; this day makes the hardware, host software, Kubernetes state, and workload authority behind that evidence explicit.

Today’s slice: We follow a single workflow API request through physical compute, virtual machines, node runtime, Kubernetes scheduling, a pod, and a Kubernetes ServiceAccount; we compare EKS and GKE at the same boundaries.

End-of-day evidence: A trace links request ID, pod UID, node UID, VM or instance ID, resource requests/limits, ServiceAccount, allowed API action, denied action, and immutable test run.

Still unsolved: External identity federation configuration, secret rotation systems, and multi-region disaster recovery remain separate decisions.

Customer use cases

An enterprise platform cannot safely process a customer workflow when operators cannot explain where its CPU, memory, storage, and authority originate. These use cases make placement and least privilege observable.

Use case IDActorCustomer jobSuccess outcomeDenial or recovery evidence
D69-UC-01Platform engineerRun a workflow API replica on capacity that can be traced to real hardwareA request reaches a Ready pod whose node and VM have recorded CPU, RAM, disk, and network allocationAn unschedulable or unready pod names the constrained layer while an existing replica remains healthy
D69-UC-02Security engineerGive the workflow API only the authority it needsThe named ServiceAccount can read its permitted ConfigMap or cloud resource through its explicit bindingA probe using a different or unbound ServiceAccount is denied and the approved path remains healthy

Actor-centred user stories

Placement and authorization become dangerous when a pod name is treated as proof of either capacity or permission. These stories require independently checkable runtime and identity evidence.

Story IDUse case IDsUser storyObservable acceptance conditions
D69-US-01D69-UC-01As a platform engineer, I want to map a workflow request from pod to physical substrate, so that I can diagnose whether compute, memory, disk, network, or scheduling caused a failureRequest, pod, node, VM, allocatable capacity, requests, limits, filesystem claim, and readiness observations share a timestamped run ID
D69-US-02D69-UC-02As a security engineer, I want workload identity separated from node and human identity, so that a compromised pod cannot inherit unrelated authorityApproved ServiceAccount action succeeds; unbound action is denied; Kubernetes RBAC and cloud workload binding are recorded separately

End-to-end product flows

A request path only becomes dependable when the software process and the resources beneath it can be distinguished. This flow begins with a customer action and ends in a proof that is useful during both capacity and identity failures.

Flow IDUse case IDsPathTriggerNumbered stepsTerminal evidence
D69-FLOW-01D69-UC-01HappyCustomer submits a workflow1. Edge routes the request to a Service.
2. Service selects a Ready pod.
3. The container process uses CPU time, RAM pages, writable filesystem space, and network packets on its node.
4. Kubelet reports status.
5. Trace joins pod, node, and provider-machine identifiers.
Request ID, pod UID, node UID, VM ID, requests/limits, readiness result, environment, timestamp, immutable run ID
D69-FLOW-02D69-UC-02DeniedProbe uses an unbound ServiceAccount1. Pod presents its projected ServiceAccount token.
2. API server or cloud identity service evaluates the explicit binding.
3. Requested action is denied.
4. Approved workload repeats its bounded action.
5. Audit records both results.
Actor, ServiceAccount, resource, scope, expected denial, observed denial, approved control, timestamp, audit ID

The pod is the smallest useful execution box: it is where the application process runs, but it is not the machine and it has no inherent authority beyond the identity explicitly attached to it.

System design derived from the flows

Calling every layer “the cluster” hides where a failure is enforced. A cluster is coordinated software plus the compute substrate it controls: the control plane stores desired state, nodes run workloads, and each node ultimately consumes physical CPU, DRAM, storage, and networking.

Use case IDEntry pointResponsible servicesAuthoritative storeFailure evidence
D69-UC-01Public workflow endpoint and DeploymentLoad balancer, Service, Deployment controller, scheduler, kubelet, container runtime, Linux kernel, provider VM serviceKubernetes API for desired/status state; provider inventory for VM/disk/network identityPending with insufficient resource, image/runtime failure, cgroup OOM, disk pressure, node NotReady, or failed probe
D69-UC-02ServiceAccount token and protected APIKubernetes API server, RBAC authorizer, projected-token issuer, cloud workload-identity federation where configuredKubernetes ServiceAccount/RoleBinding state and cloud IAM binding/audit stateForbidden, token audience/expiry failure, missing binding, or cloud IAM denial

The retained request, pod, and evidence boxes mean exactly the same thing as above. The node adds host software: kubelet asks the container runtime to create cgroups and mounts; the VM maps the node’s virtual vCPU, RAM, disk, and NIC capacity onto provider hardware. The ServiceAccount is a separate authorization boundary, not a resource reservation.

Data model and ownership

Generated-application database: Not created in this slice — Kubernetes/provider control-plane records and immutable evidence are sufficient; customer workflow data remains in the generated application’s separately owned store.

Record or entityStore and ownerPrimary keyForeign key or opaque referenceTenant keyMaterial constraintLifecycle and deletionUse case IDs
PodPlacementEvidenceKubernetes API plus evidence store, owned by platform operationsPod UID plus run IDOpaque Node UID and provider VM IDNamespace maps to platform environmentRequests must fit node allocatable capacity; status must identify observed nodeCreated per revision/run, retained for audit, expired by evidence policyD69-UC-01
WorkloadAuthorityEvidenceKubernetes RBAC and cloud IAM audit stores, owned by security platformAudit event IDServiceAccount UID and opaque cloud-principal referenceNamespace/environmentBinding grants only declared verb/resource or cloud scope; no inherited node/human authorityCreated on access, revoked by binding removal, retained then expired by policyD69-UC-02

Capacity and authorization now produce the same reviewable evidence without becoming the same authority. A managed EKS or GKE control plane operates the API-server substrate, while the selected node mode determines who configures worker machines; in either case the workload owner still defines requests, limits, ServiceAccounts, application data access, and customer outcome.

Code-to-reality: a pod identity on a node

This manifest declares desired software state; it does not directly allocate a physical server. The scheduler interprets requests against node allocatable capacity, kubelet and the runtime create the process sandbox, and the API server issues the projected identity token.

apiVersion: v1
kind: ServiceAccount
metadata:
  name: workflow-api
  namespace: platform
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: workflow-api
  namespace: platform
spec:
  template:
    spec:
      serviceAccountName: workflow-api # Selects workload identity; it is not a human login.
      containers:
        - name: api
          image: registry.example/workflow-api@sha256:REPLACE_ME
          resources:
            requests: { cpu: "500m", memory: "1Gi" } # Scheduler placement input.
            limits: { memory: "2Gi" } # Linux cgroup memory ceiling.
DeclarationInterpreter and software stateCompute, memory, and storage effectObservable proof
requestsScheduler records a placement requirementReserves schedulable vCPU/RAM accounting; it does not pre-fill DRAMkubectl describe pod shows node and requests
limits.memoryKubelet/runtime writes cgroup limitProcess may use physical RAM until its cgroup ceiling; excess can terminate itOOMKilled status and node metrics
serviceAccountNameAPI server mounts a short-lived projected tokenConsumes negligible node storage; changes no CPU/RAM entitlementkubectl auth can-i and audit event show allowed/denied scope

Run, fail, and recover

kubectl -n platform get pod -l app=workflow-api -o wide # Join pod to Node.
kubectl -n platform describe pod POD_NAME                # Read requests, limits, events, and ServiceAccount.
kubectl get node NODE_NAME -o wide                       # Join Node to provider instance identity.
kubectl auth can-i get configmaps --as=system:serviceaccount:platform:workflow-api -n platform
kubectl auth can-i get secrets --as=system:serviceaccount:platform:unbound -n platform # Expected denial.

Decision rule: diagnose a workload incident from the enforcing layer outward: process/cgroup, node allocatable capacity, VM/provider capacity, then control plane. Grant a ServiceAccount only the verb, resource, namespace, and cloud scope the workload demonstrably needs; node credentials and human credentials are separate identities.

Primary references

Kubernetes ServiceAccounts provide an identity for processes running in Pods and must be granted authority through explicit policy; see Kubernetes ServiceAccounts. For managed implementations, compare the EKS security model with GKE cluster architecture.

Key takeaways

  • A cluster combines control-plane software, nodes, and the physical substrate behind those nodes.
  • CPU, memory, storage, and identity are different mechanisms with different enforcing software.
  • Managed control planes reduce provider-operated work; they do not make workload resource or access decisions disappear.

Checklist

  • [ ] Joined one request to pod, node, VM, and capacity evidence.
  • [ ] Proved one allowed ServiceAccount action and one denied action.
  • [ ] Distinguished control-plane, node, workload, and generated-application ownership.