Issue
FluxCD reconciliation failed with the error helm.toolkit.fluxcd.io/v2beta1: the server could not find the requested resource. This occurred because the Kubernetes cluster’s API server no longer supported the deprecated v2beta1 API version, which was used in HelmRelease manifests. The failure blocked FluxCD from processing Helm chart deployments, impacting CI/CD pipelines and infrastructure updates.
Culprit
The root cause was the use of the deprecated v2beta1 API version in HelmRelease manifests, which was removed in Kubernetes following its deprecation policy. The stable v2 API became available in Flux v2.3.0, but the cluster’s HelmRelease resources still referenced the older version. This resulted in API server errors during reconciliation, as the cluster no longer served the v2beta1 API group.
Solution
API Migration
Updated the HelmRelease manifests to use the stable v2 API version instead of the deprecated v2beta1. The migration involved:
- Backward Compatibility: The
v2API maintains the same structure asv2beta1, ensuring no breaking changes. - New Features: Access to features like
spec.disableValidationandspec.adoptExistingin thev2API. - Verification: Confirmed successful reconciliation using FluxCD and Kubernetes CLI commands.
Files Updated
- Replaced
apiVersion: helm.toolkit.fluxcd.io/v2beta1withapiVersion: helm.toolkit.fluxcd.io/v2in HelmRelease manifests.
Expected Outcome
The migration resolved the reconciliation failures, allowing FluxCD to process Helm chart deployments successfully. The Kubernetes cluster now fully supports the stable v2 API, ensuring compatibility with the latest FluxCD version.
This solution ensures seamless integration with the cluster’s API server and maintains alignment with the latest FluxCD features.