Kokil Thapa - Professional Web Developer in Nepal
Freelancer Web Developer in Nepal with 15+ Years of Experience

Kokil Thapa is an experienced full-stack web developer focused on building fast, secure, and scalable web applications. He helps businesses and individuals create SEO-friendly, user-focused digital platforms designed for long-term growth.

Crossplane: Kubernetes-Native Infrastructure

By Kokil Thapa | Last reviewed: August 2026

Crossplane: Kubernetes-Native Infrastructure extends your cluster’s API server to provision and manage external cloud resources—databases, buckets, VPCs—using the same kubectl workflows you already use for application deployments. Instead of maintaining separate Terraform state files or clicking through cloud consoles, you define infrastructure as Kubernetes Custom Resources (CRDs) that reconcile continuously against real-world provider APIs. For teams already operating GitOps pipelines for applications, this unifies infrastructure and application lifecycle management into a single control plane.

If you are evaluating whether to adopt this approach over traditional tooling, understanding the architectural differences is critical before committing production workloads. While my primary expertise lies in Laravel and PHP backend development, I have increasingly integrated Kubernetes-native infrastructure patterns for clients requiring scalable, self-healing platform layers beneath their applications. The shift from static provisioning to continuous reconciliation fundamentally changes how you design deployment pipelines and handle operational failures.

How does Crossplane: Kubernetes-Native Infrastructure differ from Terraform?

The most common question engineers ask is why they should replace working Terraform modules. The distinction is not about syntax preference; it is about control loop architecture. Terraform operates on a plan-apply cycle: you run a command, it makes API calls, records state, and stops. If someone manually changes a security group five minutes later, Terraform will not know until the next manual apply. Crossplane runs as a set of controllers inside your cluster, constantly watching both the desired state (your YAML) and the actual state (cloud provider API). When drift occurs, it reconciles automatically.

Terraform ModelDeveloper runs terraform applyAPI Calls + State File UpdateProcess Ends (No Monitoring)Drift persists until next manual runCrossplane ModelGit Push / kubectl applyController Reconcile LoopContinuous Drift CorrectionSelf-healing infrastructure state
Terraform executes once per invocation while Crossplane: Kubernetes-Native Infrastructure maintains a persistent reconciliation loop that corrects drift automatically.

This continuous reconciliation model aligns infrastructure management with the same patterns used for CI/CD pipeline automation. You store your resource definitions in Git, use ArgoCD or Flux to sync them, and let the controllers handle the rest. There is no state file to corrupt, no lock to contend with across team members, and no separate CLI to install on every developer machine. The trade-off is complexity: debugging a failing reconciliation requires understanding Kubernetes events, controller logs, and provider-specific status conditions rather than reading a linear Terraform plan output.

FeatureTerraformCrossplane
Execution ModelImperative plan/apply CLIDeclarative controller loop
State ManagementExternal .tfstate fileKubernetes etcd (native objects)
Drift DetectionManual refresh requiredAutomatic continuous correction
AbstractionModules (static)Compositions (dynamic, typed)
Integration SurfaceCLI / CI jobKubernetes API / RBAC / GitOps
Multi-tenancyWorkspace / directory isolationNative namespace + RBAC boundaries

How do you install providers and configure credentials securely?

Crossplane itself is just an orchestrator; it cannot provision anything without Providers. A Provider is a Kubernetes controller that translates Crossplane resource definitions into specific cloud API calls. As of 2026, the official AWS, GCP, Azure, and Alibaba Cloud providers are stable, alongside community providers for DigitalOcean, Cloudflare, and others.

Installing the AWS Provider

Create a provider.yaml manifest. Pin to a specific version to avoid unexpected breaking changes during upgrades:

<!-- provider.yaml -->
apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
  name: provider-aws-s3
spec:
  package: xpkg.upbound.io/upbound/provider-aws-s3:v1.2.1

Apply it and wait for the provider to become healthy:

kubectl apply -f provider.yaml
kubectl get providers
# NAME                INSTALLED   HEALTHY   PACKAGE                                        AGE
# provider-aws-s3     True        True      xpkg.upbound.io/upbound/provider-aws-s3:v1.2.1  45s

Configuring Credentials Without Secrets in Git

Never commit cloud credentials to your repository. Use the ProviderConfig resource to reference a Kubernetes Secret that is injected via your GitOps tool’s secret management (Sealed Secrets, External Secrets Operator, or Vault):

<!-- providerconfig.yaml -->
apiVersion: aws.upbound.io/v1beta1
kind: ProviderConfig
metadata:
  name: default
spec:
  credentials:
    source: Secret
    secretRef:
      namespace: crossplane-system
      name: aws-creds
      key: creds

On production systems, prefer IRSA (AWS), Workload Identity (GCP), or Managed Identity (Azure) over static access keys. These mechanisms eliminate long-lived credentials entirely and are supported natively by Crossplane providers via credentials.source: InjectedIdentity. This is especially important for Nepal-based teams managing international cloud accounts where credential rotation policies may be difficult to enforce across distributed developers.

What are Composite Resources and how do compositions work?

Raw Managed Resources (MRs) map 1:1 to cloud APIs. Exposing these directly to application teams defeats the purpose of platform engineering. Compositions let you create higher-level abstractions called Composite Resource Definitions (XRDs) that bundle multiple MRs into a single, opinionated interface.

Application TeamClaimPostgreSQLInstancePlatform TeamComposite ResourceXPostgreSQLInstanceCompositionRDS InstanceSecurity GroupSubnet BindingCloud ProviderAWS RDSAWS VPC / SGAWS Subnet
Crossplane compositions decouple application team claims from underlying cloud resources, enabling platform teams to change implementations without breaking consumer interfaces.

Define an XRD that exposes only the parameters your developers need:

<!-- xrd.yaml -->
apiVersion: apiextensions.crossplane.io/v1
kind: CompositeResourceDefinition
metadata:
  name: xpostgresqlinstances.platform.example.com
spec:
  group: platform.example.com
  names:
    kind: XPostgreSQLInstance
    plural: xpostgresqlinstances
  claimNames:
    kind: PostgreSQLInstance
    plural: postgresqlinstances
  versions:
    - name: v1alpha1
      served: true
      referenceable: true
      schema:
        openAPIV3Schema:
          type: object
          properties:
            spec:
              type: object
              properties:
                storageGB:
                  type: integer
                  description: Requested storage in gigabytes
                tier:
                  type: string
                  enum: [standard, high-memory]
              required: [storageGB]

Then bind it to real infrastructure via a Composition. This is where you encode organizational policy—encryption standards, networking rules, backup windows—so application teams cannot accidentally violate compliance requirements. When building custom admin panels or SaaS backends, this abstraction prevents junior developers from provisioning oversized databases or misconfigured public endpoints.

How do you handle drift correction and operational debugging?

Drift correction is Crossplane’s killer feature, but it can also cause confusion if you do not understand the reconciliation semantics. When a managed resource is modified outside Kubernetes (e.g., via AWS Console), the controller detects the discrepancy on its next reconcile interval (default: 10 minutes) and reverts the change. This is desirable for enforcing policy but dangerous during incident response when an engineer needs to make an emergency manual fix.

To pause reconciliation temporarily, annotate the resource:

kubectl annotate rdsinstance.database.aws.upbound.io/my-db \
  crossplane.io/paused=true

Remove the annotation when the incident is resolved. Always document this escape hatch in your runbooks.

Debugging Failed Reconciliations

When a resource stays in Synced: False, follow this diagnostic sequence:

  1. Check the resource events: kubectl describe <resource> <name> — the Events section usually contains the exact API error message from the cloud provider.
  2. Inspect controller logs: kubectl logs -n crossplane-system deploy/provider-aws-s3-xxx — look for rate limiting, authentication failures, or dependency errors.
  3. Verify ProviderConfig health: Ensure credentials have not expired and IAM permissions match the resource type being provisioned.
  4. Check management policies: If using managementPolicies: Observe, the controller will never create or update; confirm you intended this mode.

A common mistake in 2026 is assuming that deleting a Claim deletes all underlying resources immediately. Deletion follows the deletionPolicy specified in the Composition or Managed Resource. If set to Retain, the cloud resource persists after the Kubernetes object is removed. Always verify this setting before decommissioning environments to avoid orphaned billing resources—a painful lesson I have seen teams learn the hard way on client projects.

When should you choose Crossplane over traditional IaC tools?

Crossplane is not a universal replacement. It excels when your organization already operates Kubernetes as a platform and wants to extend GitOps practices to infrastructure. It struggles when you need simple one-off provisioning, lack Kubernetes operational maturity, or manage resources across dozens of unrelated accounts without a central control plane.

Start EvaluationK8s already in production?NoYesUse TerraformNeed auto drift correction?NoYesUse TerraformTeam has K8s ops maturity?NoYesUse TerraformAdopt Crossplane
Decision framework for evaluating Crossplane: Kubernetes-Native Infrastructure versus traditional IaC based on operational prerequisites and drift requirements.

For Nepal-based organizations adopting cloud infrastructure, consider the operational overhead honestly. If your team is still mastering basic Kubernetes deployments, adding Crossplane introduces significant cognitive load. Start with Terraform or Pulumi, build K8s competency first, then migrate to Crossplane when you genuinely need unified GitOps for both apps and infrastructure. The cloud hosting landscape in Nepal often involves hybrid setups where local VMs coexist with international cloud resources; Crossplane can manage both, but only if your team can operate the control plane reliably.

Practical Next Steps for Adopting Crossplane

If you decide to proceed, start small. Provision a single non-critical resource type (S3 bucket, DNS record) in a staging cluster. Validate your GitOps pipeline end-to-end before composing complex multi-resource abstractions. Invest time in writing clear XRD schemas with validation and documentation—these are your internal product contracts. Monitor controller resource consumption; Crossplane providers can be memory-intensive at scale, and right-sizing requests prevents node pressure issues.

Crossplane: Kubernetes-Native Infrastructure represents a mature paradigm shift for platform teams ready to treat infrastructure as truly declarative, self-healing, and API-driven. It is not simpler than Terraform, but it is more aligned with modern Kubernetes-native operations. Evaluate it against your actual operational capabilities, not hype cycles. If you need guidance on integrating this pattern with existing Laravel or PHP application deployments, or want to discuss whether your infrastructure warrants this level of abstraction, reach out to discuss your specific architecture.

Frequently Asked Questions

Crossplane is an open-source control plane that extends Kubernetes APIs to provision and manage cloud infrastructure like databases, buckets, and networks using native YAML manifests instead of external tools.

Crossplane runs continuously inside Kubernetes as a controller loop, reconciling desired state against actual cloud resources, whereas Terraform executes imperatively via CLI commands and requires separate automation for drift detection and ongoing enforcement.

Yes, the core Crossplane project is Apache 2.0 licensed and free; costs arise only from underlying cloud resources managed and optional enterprise support subscriptions ranging Rs 50,000 to Rs 200,000 monthly depending on scale.

Official providers exist for AWS, Azure, GCP, Alibaba Cloud, and VMware, with community-maintained providers covering DigitalOcean, Linode, Scaleway, and others, all installable via Helm charts or kubectl apply against your management cluster.

Crossplane v1.18 requires Kubernetes 1.29 or higher running on AMD64 or ARM64 architectures, with recommended minimums of 2 CPU cores and 4GB RAM allocated specifically for the Crossplane system namespace controllers and provider pods.

Add the official Helm repository, create the crossplane-system namespace, then run helm install crossplane with the stable chart version, waiting for provider pods to reach Ready status before applying any composite resource definitions or claims.

Yes, using the managementPolicies field set to ObserveCreateUpdate or Import, Crossplane can adopt pre-existing resources by matching their external names, allowing gradual migration without recreating production infrastructure or causing service interruptions during transition periods.

Provider credentials reference Kubernetes Secrets stored in the crossplane-system namespace, never embedded in manifests; integrate with External Secrets Operator or Vault for rotation, and restrict RBAC so application namespaces cannot read infrastructure credential secrets directly.

XRDs define custom platform APIs that abstract multiple underlying cloud resources into single coherent interfaces, letting teams expose simplified database or cache abstractions while hiding provider-specific configuration details behind versioned schemas with validation and defaulting logic built in.

Check provider pod logs for API errors, verify IAM permissions include required actions, confirm network policies allow egress to cloud endpoints, and inspect events on both the claim and managed resource objects for specific reconciliation failures or missing dependency references blocking progress.

Review release notes for breaking changes first, backup etcd snapshots, upgrade the Helm chart incrementally one minor version at a time, monitor provider pod restarts and resource sync status, and test composite resource updates in staging before applying the same upgrade path to production clusters.

Crossplane complements rather than replaces GitOps; store XRDs, compositions, and claims in Git repositories managed by ArgoCD or Flux, letting the continuous delivery tool handle manifest synchronization while Crossplane handles the actual cloud resource lifecycle and drift correction independently.

Pulumi uses general-purpose programming languages with imperative SDKs requiring explicit deployment steps, while Crossplane uses declarative Kubernetes-native YAML with automatic reconciliation loops, making it better suited for platform teams wanting self-service infrastructure APIs without managing separate CI pipeline execution environments.

Enable Prometheus metrics endpoints on provider pods, alert on reconcile error rates exceeding thresholds, track managed resource count per provider to detect leaks, monitor API server latency for CRD operations, and dashboard sync durations to identify slow providers or misconfigured compositions degrading platform responsiveness.

Skip Crossplane for small static infrastructure where Terraform suffices, when teams lack Kubernetes operational maturity, for ephemeral development environments needing fast teardown, or when cloud vendor lock-in is acceptable and native CLI tooling already meets provisioning velocity requirements without additional abstraction overhead.

Share this article

Quick Contact Options
Choose how you want to connect me: