Skip to main content

Kustomization

Deploys resources defined in a source via Kustomize.

  • Group: kustomize.toolkit.fluxcd.io
  • Version: v1

Fields

FieldLabelTypeRequiredDescription
metadata.nameNamestringYesUnique name for this Kustomization resource.
metadata.namespaceNamespacestringYesNamespace where the resource will be created.
spec.sourceRef.kindSource KindstringYesType of source to reconcile from (GitRepository, OCIRepository, Bucket).
spec.sourceRef.nameSource NamestringYesName of the source resource.
spec.sourceRef.namespaceSource NamespacestringNoNamespace of the source resource.
spec.pathPathstringNoPath to the directory containing Kustomize files.
spec.intervalSync IntervaldurationYesHow often to reconcile the Kustomization.
spec.prunePrune ResourcesbooleanYesDelete resources removed from source.
spec.retryIntervalRetry IntervaldurationNoInterval at which to retry a failed reconciliation.
spec.timeoutTimeoutdurationNoTimeout for apply and health check operations.
spec.waitWait for ResourcesbooleanNoWait for all resources to become ready.
spec.suspendSuspendbooleanNoSuspend reconciliation of this resource.
spec.forceForce ApplybooleanNoForce resource updates through delete/recreate if needed.
spec.serviceAccountNameService AccountstringNoServiceAccount to impersonate for reconciliation.
spec.targetNamespaceTarget NamespacestringNoOverride namespace for all resources.
spec.dependsOnDependenciesarray[object]NoList of Kustomizations this depends on.
spec.healthChecksHealth Checksarray[object]NoList of resources to be included in health assessment.
spec.deletionPolicyDeletion PolicystringNoControl garbage collection when Kustomization is deleted.
spec.commonMetadataCommon MetadataobjectNoLabels and annotations to apply to all resources.
spec.namePrefixName PrefixstringNoPrefix to add to all resource names.
spec.nameSuffixName SuffixstringNoSuffix to add to all resource names.
spec.imagesImagesarray[object]NoOverride container images.
spec.patchesStrategic Merge Patchesarray[object]NoStrategic merge patches to apply.
spec.postBuildPost BuildobjectNoVariable substitution after manifests are built.
spec.decryptionDecryptionobjectNoSecrets decryption configuration (e.g., SOPS).
spec.kubeConfigRemote KubeConfigobjectNoKubeConfig for remote cluster deployment.

Example

apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: example
namespace: flux-system
spec:
interval: 5m
path: ./deploy
prune: true
sourceRef:
kind: GitRepository
name: flux-system