Questions tagged [kustomize]

Questions about using kustomize to create and modify Kubernetes manifests in an immutable way.

Kustomize traverses a Kubernetes manifest to add, remove or update configuration options without forking. It is available both as a standalone binary and as a native feature of kubectl. Kustomize supports taking a base set of Kubernetes manifest and applying overlays that apply patches to generate an environment-specific version of the base manifest. It also included generators for configuration maps and secrets.

362 questions
2
votes
1 answer

How to flatten generated configMap from configMapGenerator?

I'm trying to use Kustomize to generate ConfigMaps from files that contain key-value pairs. My kustomization file contains this: configMapGenerator: - name: my-config files: - environment.properties The environment.properties…
Steven Liekens
  • 13,266
  • 8
  • 59
  • 85
2
votes
4 answers

How to mount same volume on to all pods in a kubernetes namespace

We have a namespace in kubernetes where I would like some secrets (files like jks,properties,ts,etc.) to be made available to all the containers in all the pods (we have one JVM per container & one container per pod kind of Deployment). I have…
Mukund Jalan
  • 1,145
  • 20
  • 39
2
votes
1 answer

kustomization: patch in multiple volumeMounts

I'm trying to patch in (patchJSON6922) multiple volumeMounts to a base kustomization. However, when I patch in more than one volumeMounts I get errors. Here's my configuration: kustomization.yaml commonLabels: app: my-app imageTags: - name:…
Gerb
  • 883
  • 12
  • 31
2
votes
0 answers

Reuse JSON patches in kustomize

I am using a JSON patch in my overlay kustomization file in order to set the image to use for my pods. The patch itself is pretty generic: - op: replace path: /spec/template/spec/containers/0/image value: myRegistry/myImage:myTag And in my…
ITChap
  • 4,057
  • 1
  • 21
  • 46
2
votes
2 answers

kubernetes - ConfigMap mount into single file

I'm trying to mount a file using configmap during kubernetes deployment. I have my application properties as data in my configmap. I'm creating configmap using kustomize. Kustomize will help to merge two configmaps. When I build kustomize it returns…
Dinesh
  • 1,135
  • 2
  • 10
  • 15
2
votes
1 answer

Kubernetes deployment is missing Kustomize's hash suffixes

I'm new to Kubernetes. In my project I'm trying to use Kustomize to generate configMaps for my deployment. Kustomize adds a hash after the configMap name, but I can't get it to also change the deployment to use that new configMap…
Laurenz
  • 1,810
  • 12
  • 25
2
votes
2 answers

Is there a way to make kustomize merge headings in a yaml file instead of completely replacing that heading with the overlay yaml

i have a base yaml and an overlay yaml and using "kustomize" i want to merge these two yaml. what happens with me is that on running kustomize build there comes an output but it is not expected why? because the kustomize instead of filling the…
UmairAhmad
  • 150
  • 3
  • 14
1
vote
1 answer

kustomization Error: json: cannot unmarshal number into Go struct field Image.images.newTag of type string

i have defined a kustomization.yaml in my CI/CD pipeline which will be updated by jenkins when a new build is done. The Update concerns the image tag of the builded and pushed image to the registry. It is working quite good unless the image tag…
Gernot Grames
  • 151
  • 1
  • 5
1
vote
0 answers

Kustomize: How to Reference Name of a Secret Generated by secretGenerator in Deployment When Hash Suffix is Added?

Problem Summary: I am using Kustomize to generate a secret using secretGenerator, and I need to reference this secret in a Deployment. Kustomize is appending a unique hash suffix to the secret name, and I'm unable to reference the generated secret…
1
vote
0 answers

kustomize: create configMap from a file in a different Git repository

I know that I can use Kustomize's configMapGenerator to create a configmap from a file that resides in the same Git repository as the "kustomization.yaml" file. For Example: apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: …
Alex Rodrigues
  • 179
  • 1
  • 1
  • 6
1
vote
0 answers

How to use default cluster-issuer with SAS Viya

I have a Kubernetes cluster with cert-manager and a cluster-issuer installed. Is there a way to get SAS Viya to use this default cluster-issuer, instead of the provided sas-viya-issuer issuer? When I run a kubectl describe on one of the ingress…
Metro
  • 873
  • 8
  • 19
1
vote
1 answer

Reference autogenerated secret with name prefix

I'm using kustomize to manage a rather standard deployment. I have a namePrefix to modify the resource names. I need to add a custom resource to my configuration which itself autogenerates a secret after creation. The secret name consists of a fixed…
tsabsch
  • 2,131
  • 1
  • 20
  • 28
1
vote
1 answer

How to update Images with kustomize edit from GitHub Actions in a multi-job scenario

I have two applications (identity and API) in a single repository. I have set up in a CI/CD pipeline to deploy them to kubernetes; the images are building fine. How can I structure the kustomization.yaml file to deploy the image edits without…
1
vote
1 answer

How to replace HTTPRoute/backendRefs.name with Kustomize

Since vars is deprecated from Kustomize 5.0.0, I start to migrate to replacements by following official recomendation. But I can't figured out how to replace HTTPRoute/backendRefs.name by using replacements. My code is following. Those 2 yamls are…
akrsum
  • 117
  • 7
1
vote
0 answers

FluxCD - Centralize versions in kustomization file

I have a GitOps cluster that uses FluxCD (Kubernetes:v1.25.6-eks-48e63af and Flux: v0.40.2). Currently, each app is a separate HelmRelease in a different file. The Kustomization file lists all the resources and does nothing else. I would like to…
Nate
  • 7,606
  • 23
  • 72
  • 124