Kubernetes API-first

Why a persistent Kubernetes API resource changes the infrastructure lifecycle.

A conventional CI job requests commands to run now. An IaCStack is a persistent declaration of infrastructure intent. The operator reconciles it; the CRD defines its schema and Kubernetes stores spec and status. The controller is neither the IaC engine nor the state backend.

apiVersion: iacstack.io/v1alpha1
kind: IaCStack
metadata:
  name: app-compute
  namespace: platform-system
spec:
  sourceRef:
    repository: https://github.com/your-org/infrastructure.git
    path: stacks/compute
    version: v1.0.0
  workflowRef:
    name: governed
  inputs:
    instance_count: "3"
  reconciliation:
    driftCheckInterval: 24h
  lifecycle:
    deletionPolicy: Retain

This is illustrative: register the alias and supply a real repository, revision and inputs.

API conceptBehavior
Desired stateSource, inputs, workflow and lifecycle in spec
Observed stateStatus and conditions record attempts and results
ReconciliationNew intent, eligible retries and scheduled drift checks
DependenciesGate eligibility and suspension
DeletionRetain by default; Destroy requests governed teardown

A GitOps agent, authorized API client or portal can submit the same declaration. Kubernetes RBAC governs access to the resource, not cloud entitlements or backend ownership. The workflow owns source resolution, backend locking, credentials, plan, policy, apply and verification. The controller enforces one active attempt per stack, not one writer per backend across stacks. Drift scheduling does not imply automatic remediation.

Platform Engineering integration · Get started