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
8
votes
2 answers

kustomize patching a specific container other than by array (/containers/0)

I'm trying to see if there's a way to apply a kustomize patchTransformer to a specific container in a pod other than using its array index. For example, if I have 3 containers in a pod, (0, 1, 2) and I want to patch container "1" I would normally…
pocketjokers
  • 111
  • 1
  • 1
  • 4
8
votes
2 answers

How to patch configmap in json file with kustomize?

How to patch "db.password" in the following cm with kustomize? comfigmap: apiVersion: v1 data: dbp.conf: |- { "db_properties": { "db.driver": "com.mysql.jdbc.Driver", "db.password": "123456", "db.user": "root" …
Lior
  • 81
  • 1
  • 3
8
votes
1 answer

Is there a way to add new Resources with Kustomize (as opposed to overlaying them)?

Using kubectl apply -k, you can overlay Resource configs (that you have already defined). Can you create resources as well? In my specific case I want to create a local Volume for the development environment. I do not have this Resource in the base…
Tom
  • 4,776
  • 2
  • 38
  • 50
7
votes
1 answer

Replace contents of an item in a list using Kustomize

I'm having difficulty trying to get kustomize to replace contents of an item in a list. My kustomize file apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - resource.yaml patches: - patch.yaml My patch.yaml…
sebastian
  • 2,008
  • 4
  • 31
  • 49
7
votes
1 answer

Kustomize resource GitHub private repository

I was wondering if is possible to get resources from kustomize in a private GitHub repository, I already tried something like this without success apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: -…
user3573246
  • 125
  • 1
  • 6
7
votes
1 answer

Replace specific values using Kustomize

I am evaluating Kustomize as a templating solution for my Project. I want an option to replace specific key-value pairs. ports: - containerPort: 8081 resources: limits: cpu: $CPU_LIMIT memory: $MEMORY_LIMIT requests: cpu: $CPU_REQUESTS …
CSUNNY
  • 414
  • 1
  • 7
  • 23
7
votes
1 answer

Use different name of the kustomization.yaml

For CI/CD purposes, the project is maintaining 2 kustomization.yaml files Regular deployments - kustomization_deploy.yaml Rollback deployment - kustomization_rollback.yaml To run kustomize build, a file with the name "kustomization.yaml" is…
Girish
  • 171
  • 2
  • 9
7
votes
1 answer

kustomize, secretGenerator & patchesStrategicMerge: envFrom.secretRef not reading hashed secret name

In my kustomization.yaml I have: ... secretGenerator: - name: db-env behavior: create envs: - my.env patchesStrategicMerge: - app.yaml And then in my app.yaml (the patch) I have: apiVersion: apps/v1 kind: Deployment metadata: …
mpen
  • 272,448
  • 266
  • 850
  • 1,236
7
votes
4 answers

kustomize and kubectl not finding CRDs

I'm using kustomize to pipe a manifest to kubectl on a new k8s cluster (v1.17.2). This includes CRDs, but other objects are unable to find them. For example: unable to recognize "STDIN": no matches for kind "Certificate" in version…
7
votes
1 answer

Kubernetes Kustomize: replace variable in patch file

Given the following kustomize patch: apiVersion: apps/v1 kind: Deployment metadata: name: flux spec: template: spec: containers: - name: some-name args: - --some-key=some-value ... …
user2074945
  • 537
  • 2
  • 8
  • 22
6
votes
2 answers

ArgoCD & Traefik 2.x: How to configure argocd-server Deployment to run with TLS disabled (where to put --insecure flag)

We have a setup with Traefik as the Ingress Controller / CRD and ArgoCD. We installed ArgoCD into our EKS setup as described in the Argo getting stared guide: kubectl create namespace argocd kubectl apply -n argocd -f…
jonashackt
  • 12,022
  • 5
  • 67
  • 124
6
votes
2 answers

How to fix metadata.resourceVersion: Invalid value: "": must be specified for an update

So i have this project that i already deployed in GKE and i am trying to make the CI/CD from github action. So i added the workflow file which contains name: Build and Deploy to GKE on: push: branches: - main env: PROJECT_ID: ${{…
6
votes
1 answer

Finding kustomize version shipped with kubectl

I usually use the kustomize supplied with kubectl. I'm wondering if there is a way to find the kustomize version that is shipped with kubectl ?
Sibi
  • 47,472
  • 16
  • 95
  • 163
6
votes
1 answer

Kustomize nameSuffix skip on some resources

I am using Kustomize to manage multiple variations of the same cluster. I am using nameSuffix option to add a suffix to all my resources: nameSuffix: -mysfx My problem is that everything works fine but adding this suffix only to one Service…
Salvatore D'angelo
  • 1,019
  • 3
  • 14
  • 39
6
votes
1 answer

Is there any documentation on how to use vars in kustomize?

I want to use vars without ConfigMaps or Secrets. Declaring a value would be sufficient for me. But I couldn't see any documentation regarding vars attributes or how I can use. Do you know any docs about this? Thanks! vars: - name: ROUTE_HOST …
cosmos-1905-14
  • 783
  • 2
  • 12
  • 23
1
2
3
24 25