gateway-api packageInstall can fail to reconcile. message: |- Addon Gateway-Api is not ready: kapp: Error: update customresourcedefinition/grpcroutes.gateway.networking.k8s.io (apiextensions.k8s.io/v1) cluster: Updating resource customresourcedefinition/grpcroutes.gateway.networking.k8s.io (apiextensions.k8s.io/v1) cluster: API server says: CustomResourceDefinition.apiextensions.k8s.io "grpcroutes.gateway.networking.k8s.io" is invalid: status.storedVersions[0]: Invalid value: "v1alpha2": missing from spec.versions; v1alpha2 was previously a storage version, and must remain in spec.versions until a storage migration ensures no data remains persisted in v1alpha2 and removes v1alpha2 from status.storedVersions (reason: Invalid)
Clusterbootstrap
refName: gateway-api.tanzu.vmware.com.1.2.1+vmware.6-tkg.1 ... message: |- kapp: Error: update customresourcedefinition/grpcroutes.gateway.networking.k8s.io (apiextensions.k8s.io/v1) cluster: Updating resource customresourcedefinition/grpcroutes.gateway.networking.k8s.io (apiextensions.k8s.io/v1) cluster: API server says: CustomResourceDefinition.apiextensions.k8s.io "grpcroutes.gateway.networking.k8s.io" is invalid: status.storedVersions[0]: Invalid value: "v1alpha2": missing from spec.versions; v1alpha2 was previously a storage version, and must remain in spec.versions until a storage migration ensures no data remains persisted in v1alpha2 and removes v1alpha2 from status.storedVersions (reason: Invalid) status: "True" type: Gateway-Api-ReconcileFailed
Note: This error may also appear for the referencegrants.gateway.networking.k8s.io CRD. VKS Clusters upgrading from VKr 1.32.x to 1.33.x will encounter this failure if either CRD has v1alpha2 present in status.storedVersions. Clusters where these resources were never created, or where only v1 / v1beta1 were utilized, are unaffected.
This issue is caused by a breaking change introduced in the upstream Gateway API v1.2.0 minor release. Support for the v1alpha2 API version of the GRPCRoute and ReferenceGrant CRDs was removed in both the Standard and Experimental channels.
VKr 1.32.x ships with the gateway-api package v1.0.0, where CRDs still serve and store v1alpha2. VKr 1.33.x ships with the gateway-api package v1.2.1, which is built from the newer upstream Gateway API and no longer serves v1alpha2.
To check the value, run the following commands:
kubectl get crd grpcroutes.gateway.networking.k8s.io -ojsonpath="{.status.storedVersions}"
storedVersions:
- v1alpha2
- vAll v1alpha2 stored resources must be manually migrated before the CRD's storedVersions can be cleaned up.
Important: This migration must be completed directly on the VKS Cluster before the VKr 1.32 to 1.33 upgrade is triggered.
Step 1: Check whether the CRDs are affected
In the VKS Cluster, evaluate status.storedVersions on both CRDs:
kubectl get crd grpcroutes.gateway.networking.k8s.io -ojsonpath="{.status.storedVersions}"
kubectl get crd referencegrants.gateway.networking.k8s.io -ojsonpath="{.status.storedVersions}"
If either output includes v1alpha2, that version must be manually removed from storedVersions prior to triggering the upgrade. Proceed to Step 2.
Step 2: Migrate existing resources to the latest storage version
Before removing v1alpha2 from storedVersions, every existing GRPCRoute and ReferenceGrant object must be forced to re-persist at its latest storage version. Execute the following script on the VKS Cluster:
crds=("GRPCRoutes" "ReferenceGrants")
for crd in "${crds[@]}"; do
output=$(kubectl get "${crd}" -A -o json)
echo "$output" | jq -c '.items[]' | while IFS= read -r resource; do
namespace=$(echo "$resource" | jq -r '.metadata.namespace')
name=$(echo "$resource" | jq -r '.metadata.name')
kubectl patch "${crd}" "${name}" -n "${namespace}" --type='json' -p='[{"op": "replace", "path": "/metadata/annotations/migration-time", "value": "'"$(date +%Y-%m-%dT%H:%M:%S)"'" }]'
done
done
This annotation patch forces the API server to write each object back using the current storage version, ensuring no data remains persisted under the legacy v1alpha2 format.
Step 3: Patch the CRDs to drop v1alpha2 from storedVersions
Once all resources have been successfully re-persisted, the CRDs must be patched in the VKS Cluster to remove the deprecated version:
kubectl patch customresourcedefinitions referencegrants.gateway.networking.k8s.io --subresource='status' --type='merge' -p '{"status":{"storedVersions":["v1beta1"]}}'
kubectl patch customresourcedefinitions grpcroutes.gateway.networking.k8s.io --subresource='status' --type='merge' -p '{"status":{"storedVersions":["v1"]}}'
Step 4: Verify the CRDs are clean
Confirm no resources are utilizing v1alpha2 by running the verification commands again:
kubectl get crd grpcroutes.gateway.networking.k8s.io -ojsonpath="{.status.storedVersions}"
kubectl get crd referencegrants.gateway.networking.k8s.io -ojsonpath="{.status.storedVersions}"
Step 5: Trigger the VKr 1.32 to 1.33 upgrade
Once the CRDs are confirmed to be clean on the VKS Cluster, the VKr upgrade can be safely triggered from the Supervisor. The kapp-controller will successfully reconcile the gateway-api package as part of the upgrade.
This procedure supersedes partial steps historically provided for the grpcroutes CRD alone. Both grpcroutes and referencegrants must be migrated comprehensively to avoid cluster state discrepancies.