Ninja Docs Help

Move resources from HelmRelease to Kustomization

Revision

Date

Description

1.0

24.07.2024

Init Changelog

Introduction

This article explains how to move resources created with HelmRelease (FluxCD) to Kustomization (also FluxCD) without removing it from cluster.

Requirements

To perform this action you will need:

  • Access to Kubernetes cluster

  • Access to FluxCD repository with reposurces

  • Flux CLI

  • kubectl

  • Helm 3

Instructions

Follow instructions below:

  1. Suspend HelmRelease: flux suspend hr <name> -n <namespace>.

  2. Remove HelmRelease definition from FluxCD repository.

  3. Check if Helm Chart is still deployed on cluster: helm ls -A.

  4. Check Secrets from Namespace your Helm Chart is deployed and find all resources with type=helm.sh/release.v1: kubectl get secrets -n <namespace>.

  5. Delete all Secrets found in step 4 that's name match to: sh.helm.release.v1.<name>.v* - these secrets contains Helm Release information.

  6. Check if Helm Chart is still deployed on cluster (it shouldn’t): helm ls -A.

  7. Create and commit YAML manifests for all resources from HelmRelease and attach it to Kustomization for FluxCD.

  8. Wait till FluxCD reconcile.

  9. Check if all resources have FluxCD labels (kustomize.toolkit.fluxcd.io/name and kustomize.toolkit.fluxcd.io/namespace).

  10. (optional) Cleanup all Helm annotations and labels from all resources using kubectl edit command.

Last modified: 17 February 2025