Platform Engineering Deep Dive: IaC, K8s, Edge OTA, Routing
System DesignModel answerLast updated
Explain how you would automate bare-metal and Kubernetes delivery, run edge firmware rollouts, reason about IP routing, and describe a homelab that backs up your claims.
You are interviewing for a platform or infrastructure engineering role and are asked to cover the following areas in a single conversation. Aim for a few minutes per area, using concrete tools, failure modes and numbers rather than a list of buzzwords.
-
Infrastructure as Code. Summarize your hands-on experience. Then present a reference design for provisioning and updating bare-metal servers and Kubernetes clusters through CI/CD. Cover how secrets are handled, how you keep operations idempotent, and how you detect and respond to configuration drift.
-
Kubernetes control loop and workload management. Explain the reconciliation loop that Kubernetes controllers follow. Then outline how you would manage workloads: scheduling, resource requests and limits, quotas, horizontal and vertical pod autoscaling, cluster autoscaling, and multi-tenancy.
-
Edge fleet management. Design and operate a system that manages firmware on a large population of edge devices. It should handle over-the-air updates, staged rollouts, rollback, and device health telemetry.
-
Routing. Explain how an IP routing table is used to forward packets, including longest-prefix match and the difference between static and dynamic routing. Describe how you would troubleshoot a blackhole and asymmetric routing.
-
Homelab. Describe your own lab setup and what it demonstrates about your automation, networking, observability and security skills.
State your assumed scale at the start, and call out trade-offs and guardrails where they matter.
Hints
Hint 1
Open by fixing a scale (for example, a couple thousand bare-metal nodes, a few dozen clusters, tens of thousands of edge devices) so every later design choice can be justified against it.
Hint 2
For IaC and Kubernetes, think in layers (hardware, OS image, infra resources, clusters, workloads) and note that the same declarative, level-triggered reconcile pattern appears at each layer, including GitOps.
Hint 3
For the fleet and routing parts, structure around safety: signed artifacts, A/B partitions, canary stages with health gates and automatic rollback; and for routing, always start from the forwarding decision (longest prefix wins) and trace hop by hop in both directions.
Model answer
Hard Try it yourself first — then compare your approach, complexity and edge cases.
Framing
Begin with an assumed scale: roughly 2,000 bare-metal GPU nodes in 3 data centers, about 20 Kubernetes clusters (prod, staging, per-tenant), and about 50,000 edge devices. Require that every change is auditable, reversible and never done by hand over SSH.
1. IaC reference design
Use one declarative tool per layer:
| Layer | Tooling | Role |
|---|---|---|
| Hardware | Redfish/IPMI, PXE with MAAS, Tinkerbell or Metal3 | Power, BIOS/firmware, OS install |
| OS image | Packer-built immutable images, cloud-init | Kernel, GPU drivers, base config |
| Infra resources | Terraform/OpenTofu | Networks, DNS, load balancers, IPAM |
| Clusters | Cluster API (bare-metal provider) | Control plane and node pools as CRDs |
| Workloads | Argo CD or Flux (GitOps) | Add-ons, operators, apps |
Pipeline. A pull request runs lint, schema validation (kubeconform), policy checks (OPA/Conftest) and a plan posted to the PR. After review and merge, apply runs against remote locked state. Promote lab, then staging, then one production site, then the rest.
Secrets. Nothing in plaintext in Git. Use SOPS with KMS, or Vault with External Secrets Operator. CI gets short-lived credentials by OIDC federation. Use dynamic secrets for databases and BMC credentials with automatic rotation. Encrypt and restrict Terraform state because it can contain secrets.
Idempotency. Declare end state, not steps. A second run should report zero changes. Prefer reimaging over mutating nodes. Key provisioning on serial number or MAC so a retried job converges rather than duplicates.
Drift detection. Nightly terraform plan -detailed-exitcode (exit 2 means drift) alerts. Argo CD continuously diffs live state against Git. Host agents (osquery, periodic ansible --check) compare hosts to the golden config. Decide explicitly which drift self-heals and which pages a human.
2. Kubernetes
Reconciliation loop. Desired state lives in etcd, reached only through the API server. A controller: watches via informers and a cache, enqueues the object key, compares spec to observed state, takes the minimal action, writes .status, and requeues with backoff on error. It is level-triggered, so missed events are harmless and resyncs heal gaps. Controllers compose (Deployment, ReplicaSet, Pod, scheduler, kubelet), and resourceVersion gives optimistic concurrency.
Workload management.
- Scheduling: filter then score. Use topology spread and anti-affinity for availability, taints for GPU nodes, PriorityClasses for preemption.
- Requests/limits: requests drive placement. CPU over limit is throttled, memory over limit is OOM-killed. QoS class sets eviction order. GPU requests must equal limits.
- Quotas: ResourceQuota per namespace (CPU, memory, GPUs, object counts), LimitRange for defaults.
- HPA:
desired = ceil(current * currentMetric / target), with custom metrics such as queue depth and stabilization windows against flapping. - VPA: right-size requests, but do not let HPA and VPA act on the same metric. Run VPA in recommend-only mode where both are needed.
- Cluster Autoscaler: scales on unschedulable Pending pods and drains underused nodes, subject to PDBs. On bare metal it claims hosts from a finite pre-racked pool, so alert on pool depletion and do capacity planning.
- Multi-tenancy: soft isolation with namespaces, RBAC, default-deny NetworkPolicy, quotas and the
restrictedPod Security level. For untrusted tenants use dedicated or virtual clusters, or sandboxed runtimes (Kata, gVisor). For GPUs consider MIG and dedicated nodes.
3. Edge fleet management
Components: on-device agent, device registry, rollout controller, signed artifact store behind a CDN, and a telemetry pipeline (MQTT/HTTPS to Kafka to a time-series DB and alerting).
Model: Device(id, hw_rev, cohort, current_version, target_version, last_seen, health), Release(version, sha256, signature, min_hw_rev), Rollout(release, stages, gates, status).
Delivery: devices poll for their desired version. Pull works through NAT and flaky links and avoids inbound ports.
Update mechanics:
- A/B partitions: write the inactive slot, verify signature and hash, reboot into it, and mark it good only after a health check passes. A boot counter or watchdog reverts automatically on failure.
- Resumable, delta downloads with jittered scheduling to avoid thundering herds.
- Respect hardware compatibility and maintenance windows.
Staged rollout: internal devices, then 1%, 5%, 25%, 100%, with a soak period between stages. Gates compare crash rate, boot success, connectivity and key metrics against a control cohort. A breach pauses automatically, and an operator can abort and set the target back to the previous version.
Telemetry: heartbeat, version, boot reason, resource usage, error counters. Alert on silent devices (no heartbeat) as well as bad ones. Use sampling and aggregation to control volume and cost.
Security: signing keys in an HSM, anti-rollback counters, device identity via per-device certificates.
4. Routing
Forwarding. The router picks, among all routes whose prefix contains the destination, the longest prefix (most specific). Ties are broken by administrative distance, then metric. A default route 0.0.0.0/0 matches only when nothing else does.
Static vs dynamic. Static routes are simple, predictable and good for small or stub networks, but do not react to failures unless paired with tracking. Dynamic protocols (OSPF inside a domain, BGP between domains and in data-center fabrics) converge around failures and scale, at the cost of complexity and the risk of propagating bad routes, so use filters, prefix limits and max-path settings.
Troubleshooting a blackhole. Confirm scope (which source, destination, protocol). Run traceroute/mtr to find the last responding hop. On that device inspect the route (ip route get, show ip route <dst>). Common causes: a missing or more-specific route pointing to nowhere, a stale static route, a null route or aggregate with no covering more-specific, a withdrawn BGP prefix, or an ACL/firewall drop. Also check the next hop's ARP/neighbor state and MTU (PMTUD black holes).
Troubleshooting asymmetric routing. Trace both directions, since the return path can differ. Asymmetry is normal with multiple uplinks or ECMP, but breaks stateful firewalls and NAT, and with reverse-path filtering (rp_filter). Fix with consistent policy (local-preference, MED, policy routing), state synchronization, or loosening strict RPF to loose mode.
5. Homelab
Give a short, honest description: for example a few mini PCs PXE-booted and provisioned from Git, a Cluster API or k3s cluster managed with Flux, SOPS-encrypted secrets, a VLAN-segmented network with a router running BGP or OSPF to the cluster, Prometheus/Grafana/Loki for observability, and a small simulated device fleet to practice A/B updates. Tie each piece to a skill and mention one failure you debugged and what you learned.
Common mistakes
- Listing tools without saying how they interact or fail.
- Claiming idempotency while relying on mutable, hand-configured hosts.
- Forgetting rollback and health gates in the fleet design.
- Troubleshooting routing in one direction only.
- Not stating assumptions about scale.