Testing Your Cloud Infrastructure Like IKEA Furniture: A Guide to Crossplane v2 End-to-End Testing
Jenkins
Source: Dev.to | Jan 21, 2026 (UTC)
Ever bought an IKEA BILLY bookshelf? You know the drill: open the box, check all the pieces are there, follow the instructions, tighten the screws, and give it a good shake to make sure it won’t collapse when you load it with your collection of unread programming books.
Testing Crossplane v2 infrastructure is remarkably similar. Except instead of a wobbly bookshelf, you’re building cloud resources. And instead of an Allen key, you’re using YAML. (Arguably, both can be equally frustrating at times.)
In this guide, I’ll walk you through setting up end-to-end (E2E) testing for Crossplane v2, using our IKEA metaphor to make the concepts stick like… well, like properly applied IKEA wood glue.
Why Test Your Infrastructure? (Or: Why You Shouldn’t Skip the Assembly Instructions)
Remember that time you thought you could assemble IKEA furniture without reading the instructions? And then you had leftover screws? And the drawer didn’t quite close right?
That’s what running Crossplane compositions in production without E2E testing feels like.
az version kubectl version --client helm version flux --version crossplane version
Enter fullscreen mode
Exit fullscreen mode
Pro tip: If any of these fail, don’t panic! Check the error messages. They’re usually more helpful than IKEA’s pictographic instructions.
Step 1: Building Your Workshop (Setting Up AKS)
First, we need a place to assemble our furniture. Let’s create an AKS cluster:
# Set up your environment variables export RESOURCE_GROUP="crossplane-e2e-rg" export LOCATION="westeurope" export CLUSTER_NAME="crossplane-e2e-aks" export CROSSPLANE_VERSION="2.1.0" # Log into Azure az login az account set --subscription "YOUR_SUBSCRIPTION_ID" # Create your workshop (resource group) az group create \ --name $RESOURCE_GROUP \ --location $LOCATION \ --tags environment=development managedBy=crossplane # Build the workbench (AKS cluster) az aks create \ --resource-group $RESOURCE_GROUP \ --name $CLUSTER_NAME \ --node-count 3 \ --node-vm-size Standard_D2s_v3 \ --enable-managed-identity \ --network-plugin azure \ --generate-ssh-keys
Enter fullscreen mode
Exit fullscreen mode
This takes about 5-10 minutes. Perfect time for a Swedish meatball break! 🍝
# Connect your tools to the workbench az aks get-credentials \ --resource-group $RESOURCE_GROUP \ --name $CLUSTER_NAME # Verify you're connected kubectl get nodes
Enter fullscreen mode
Exit fullscreen mode
Step 2: Installing Crossplane (Getting Your Assembly Instructions Ready)
Now let’s install Crossplane v2. Think of this as opening the IKEA box and laying out all the instruction sheets:
NAME READY STATUS RESTARTS AGE crossplane-xxx 1/1 Running 0 1m crossplane-rbac-manager-xxx 1/1 Running 0 1m
Enter fullscreen mode
Exit fullscreen mode
Step 3: Setting Up Azure Authentication (The Security Sticker)
Just like IKEA furniture has those “quality checked” stickers, we need to authenticate Crossplane with Azure:
# Get your subscription ID export SUBSCRIPTION_ID=$(az account show --query id -o tsv) # Create a service principal (think of it as the QA inspector's badge) SP_OUTPUT=$(az ad sp create-for-rbac \ --name "crossplane-e2e-${CLUSTER_NAME}" \ --role Contributor \ --scopes /subscriptions/$SUBSCRIPTION_ID \ --output json) # Extract and save the credentials export AZURE_CLIENT_ID=$(echo $SP_OUTPUT | jq -r '.appId') export AZURE_CLIENT_SECRET=$(echo $SP_OUTPUT | jq -r '.password') export AZURE_TENANT_ID=$(echo $SP_OUTPUT | jq -r '.tenant') # Create a Kubernetes secret kubectl create secret generic azure-secret \ --namespace crossplane-system \ --from-literal=creds="[default] client_id = $AZURE_CLIENT_ID client_secret = $AZURE_CLIENT_SECRET tenant_id = $AZURE_TENANT_ID subscription_id = $SUBSCRIPTION_ID"
Enter fullscreen mode
Exit fullscreen mode
Important: Save these credentials! You’ll need them later, and unlike that bag of extra IKEA screws, you can’t just shrug and throw them in a drawer.
Step 4: Installing Azure Providers (Getting the Right Pieces)
Crossplane v2 uses modular providers. It’s like ordering specific IKEA departments: kitchen, bedroom, storage. We need to install the Azure providers we’ll use:
# Install the providers we need cat <<EOF | kubectl apply -f - --- apiVersion: pkg.crossplane.io/v1 kind: Provider metadata: name: provider-azure-storage spec: package: xpkg.upbound.io/upbound/provider-azure-storage:v1.3.0 --- apiVersion: pkg.crossplane.io/v1 kind: Provider metadata: name: provider-azure-network spec: package: xpkg.upbound.io/upbound/provider-azure-network:v1.3.0 EOF # Wait for providers to install (grab another coffee ☕) kubectl wait provider --all \ --for=condition=Healthy \ --timeout=600s
Enter fullscreen mode
Exit fullscreen mode
Now configure the providers to use our Azure credentials:
Time to run the quality check! This is like that satisfying moment when you tighten the last screw and give the furniture a shake to make sure it’s stable:
# Run the E2E tests kubectl kuttl test tests/e2e/01-storage-account/ # In another terminal, watch the magic happen watch kubectl get xstorageaccount,account,resourcegroup
Enter fullscreen mode
Exit fullscreen mode
You should see output like:
=== RUN kuttl harness.go:462: starting setup harness.go:252: running tests using configured kubeconfig. harness.go:285: Successful connection to cluster at: https://crossplane-e2e-aks-xxx.hcp.westeurope.azmk8s.io:443 === RUN kuttl/harness === RUN kuttl/harness/storage-account-e2e === PAUSE kuttl/harness/storage-account-e2e === CONT kuttl/harness/storage-account-e2e logger.go:42: 12:34:56 | storage-account-e2e | Creating namespace: kuttl-test-xxx logger.go:42: 12:34:57 | storage-account-e2e/0-setup | starting test step 0-setup logger.go:42: 12:35:30 | storage-account-e2e/0-setup | test step completed 0-setup logger.go:42: 12:35:30 | storage-account-e2e/1-verify | starting test step 1-verify logger.go:42: 12:35:45 | storage-account-e2e/1-verify | test step completed 1-verify logger.go:42: 12:35:45 | storage-account-e2e/2-cleanup | starting test step 2-cleanup logger.go:42: 12:36:00 | storage-account-e2e/2-cleanup | test step completed 2-cleanup === CONT kuttl harness.go:405: run tests finished harness.go:513: cleaning up harness.go:570: removing temp folder: "" --- PASS: kuttl (65.23s) --- PASS: kuttl/harness (0.00s) --- PASS: kuttl/harness/storage-account-e2e (65.12s) PASS
Enter fullscreen mode
Exit fullscreen mode
✨ If you see PASS, congratulations! Your infrastructure furniture is assembled correctly!
Troubleshooting (When Your Drawer Won’t Close)
Problem: Provider not becoming healthy
# Check provider logs kubectl logs -n crossplane-system -l pkg.crossplane.io/provider=provider-azure-storage # Usually it's authentication - double-check your secret kubectl get secret azure-secret -n crossplane-system
This usually means Azure is taking longer than expected. You can increase the timeout in your kuttl-test.yaml:
timeout: 900 # Increase from 600 to 900 seconds
Enter fullscreen mode
Exit fullscreen mode
Bonus: GitOps with Flux (Assembly Instructions on Demand)
Want to make this even more automated? Add Flux for GitOps! It’s like having IKEA deliver your furniture AND the assembly instructions automatically update when they improve them:
E2E testing validates your entire Crossplane setup – from XRD to actual Azure resources
Crossplane v2 uses pipeline mode – more powerful and flexible than v1
Test in layers: Create → Verify → Cleanup (just like assembling furniture)
Automate with tools: kuttl for testing, Flux for GitOps
Always clean up test resources – Azure charges are real!
What’s Next?
Now that you know how to test your “IKEA furniture,” you can:
Create more complex compositions (networks, databases, full applications)
Integrate E2E tests into your CI/CD pipeline
Build a platform with Backstage for self-service infrastructure
Add cost tracking and governance policies
Remember: just like IKEA furniture, Crossplane infrastructure is much better when you follow the instructions and test that everything fits together properly. Happy building! 🔧
Got questions? Drop them in the comments! I’d love to hear about your Crossplane testing experiences.
If you found this helpful, give it a ❤️ and share it with someone who’s also wrangling cloud infrastructure!
About the Author: I’m Willem, a Cloud Engineer transitioning to platform engineering. I believe complex infrastructure concepts should be accessible to everyone – even if it means comparing them to Swedish furniture. Follow me for more cloud-native content!
For further actions, you may consider blocking this person and/or reporting abuse
Залишити відповідь