After successfully running task local-setup, running task local-setup:example-data:iterate failed with:
error validating data: failed to download openapi:
Get "http://localhost:8080/openapi/v2?timeout=32s": dial tcp [::1]:8080: connect: connection refused
The example-data:iterate task expects the KCP admin kubeconfig to be active (KUBECONFIG=$(pwd)/.secret/kcp/admin.kubeconfig), but in the new shell session this env var wasn't set.
Without it, kubectl fell back to the default localhost:8080, which isn't where KCP listens (KCP is exposed on https://localhost:8443).
export KUBECONFIG=$(pwd)/.secret/kcp/admin.kubeconfig
Running the local setup with --prerelease failed with:
error: timed out waiting for the condition on platformmeshoperators/platform-mesh-operator
The PlatformMeshOperator CR was created but never became Ready, causing the wait in start.sh to time out almost immediately.
The ocm-prerelease kustomize overlay includes ../../components/platform-mesh-operator, which applies the PlatformMeshOperator CR. This CR is a kro custom resource — kro can only reconcile it once the corresponding ResourceGraphDefinition (RGD) is installed and established.
The non-prerelease path in start.sh already handles this correctly: it applies the RGD and waits for it before the PlatformMeshOperator CR is ever created. The prerelease path (setup-prerelease.sh) applied the overlay directly without that step, so kro had no knowledge of the PlatformMeshOperator type and could not reconcile the CR.
kubectl apply -k $SCRIPT_DIR/../kustomize/base/rgd
kubectl wait --namespace default \
--for=condition=Ready resourcegraphdefinition \
--timeout=$KUBECTL_WAIT_TIMEOUT platform-mesh-operatorThe prerelease path (setup-prerelease.sh) applied the overlay directly without first ensuring the RGD was ready, so kro had no knowledge of the PlatformMeshOperator type and could not reconcile the CR.
The bug was introduced in commit dc7fcfc8 (chore: ocm version upgrade #1160), which added ../../components/platform-mesh-operator to the prerelease overlay without mirroring the RGD setup step.
Apply and wait for the RGD in setup-prerelease.sh before applying the prerelease overlay:
kubectl apply -k $SCRIPT_DIR/../kustomize/base/rgd
kubectl wait --namespace default \
--for=condition=Ready resourcegraphdefinition \
--timeout=$KUBECTL_WAIT_TIMEOUT platform-mesh-operator
kubectl apply -k $SCRIPT_DIR/../kustomize/overlays/ocm-prerelease