0

I am trying to install Flux Operator using Helm install from the docs here

helm install flux-operator oci://ghcr.io/controlplaneio-fluxcd/charts/flux-operator \ --namespace flux-system

Note: I have pulled the helm chart into my own internal registry and then ran the helm install command

However I am getting the error:

ERROR: INSTALLATION FAILED: unable to build kubernetes objects from release manifest: resource mapping not found for name: "flux" namespace: "flux-system" from "": no matches for kind "FluxInstance" in version "fluxcd.controlplane.io/v1" ensure CRDs are installed first

What CRDs do I need to install? I thought this was the FluxInstance crd to install

apiVersion: fluxcd.controlplane.io/v1
kind: FluxInstance
metadata:
  name: flux
  namespace: flux-system
spec:
  distribution:
    version: "2.5.x"
    registry: <internal_registry>
  cluster:
    type: kubernetes

However, I get the same error:

resource mapping not found for name: "flux" namespace: "flux-system" from "": no matches for kind "FluxInstance" in version "fluxcd.controlplane.io/v1" ensure CRDs are installed first

1 Answers1

0

In order to be able to deploy the FluxInstance Custom Resource (CR), you need to install the Custom Resource Definition (CRD) first

The CRD resources can be installed directly on the cluster via manifests having the following:

apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition

Amongst other pieces of information, this would be the important part:

spec:
  group: fluxcd.controlplane.io
  names:
    kind: FluxInstance
    listKind: FluxInstanceList
    plural: fluxinstances
    singular: fluxinstance

Ref: https://github.com/controlplaneio-fluxcd/charts/blob/main/charts/flux-operator/templates/crds.yaml#L15C1-L22C1

Only after that you will be able to install the FluxInstance CR


The official documentation recommends the same way to install the operator and the chart is working without a problem: https://fluxcd.control-plane.io/operator/install/#helm

You can verify whether or not the resources are on the cluster via the kubectl api-resources command

My main doubt is that the chart you pulled and synchronized to your internal registry is missing the crds.yaml template