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
4
votes
1 answer

Skaffold Kustomize Passing External Environment Variable into kustomization.yaml

Is there a way I can pass external environment variable to kustomization.yaml from Skaffold. Assuming i have a kustomization file below resources: - ./deployment.yaml - ./service.yaml images: - name: abc newName:
jlim
  • 909
  • 2
  • 12
  • 24
4
votes
5 answers

diff between whats active on cluster versus kustomize

kustomize's docs provides a nice one-liner that compares two different overlays... diff \ <(kustomize build $OVERLAYS/staging) \ <(kustomize build $OVERLAYS/production) is there a way to do the same but against what is running within a specific…
yee379
  • 6,498
  • 10
  • 56
  • 101
4
votes
3 answers

using kustomize to modify nodeSelector's

It would be useful for me to be able to define at a higher level a way to determine a set of nodes that a set of pods should run ontop of. Is there a way to use kustomize so that i can specify what nodeSelectors a deployment should have?
yee379
  • 6,498
  • 10
  • 56
  • 101
4
votes
1 answer

Variable substitution in the new kubernetes kustomize support (since 1.14.0): kubectl apply -k ./

We are using kustomize for our kubernetes deployments in this way: apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment labels: app: nginx spec: replicas: 3 selector: matchLabels: app: nginx template: …
KiteUp
  • 308
  • 3
  • 10
3
votes
1 answer

How can I delete environment variable with kustomize?

I want to remove a few environment variables in a container with kustomize? Is that possible? When I patch, it just adds as you may know. If it's not possible, can we replace environment variable name, and secret key name/key pair all together? …
cosmos-1905-14
  • 783
  • 2
  • 12
  • 23
3
votes
0 answers

Kustomize + Helm error on chart semver requirements

I'm attempting to install the argo-cd helm chart with kustomize using the --enable-helm feature. This results in a kubeVersion compatibility error. I am confused by this result as the version of kubernetes client and server are both greater than the…
3
votes
1 answer

How could I preview the final result when applying kustomizations to a git repo with helm templates?

I have a git repo with helm charts, and a git repo per environment with kustomizations for those charts. All of this in working great with flux. But I don't know how to "preview" my changes to the kustomization files. Let's say I edit the dev…
michal-b
  • 81
  • 5
3
votes
2 answers

How to add a new entry to yaml file via code

I’ve yaml file and I need to add to it data on runtime using go code The path is like following, I mean This is the yaml file with one entry under sif of snk_dev spec: mec: tolerations: - effect: NoSchedule key: WorkGroup …
Jenney
  • 171
  • 6
  • 18
3
votes
1 answer

ArgoCD with Sealed Secrets and Kustomize

I am trying to configure Bitnami SealedSecrets with ArgoCD and Kustomize. I have managed to encrypt the secrets using the kubeseal CLI, these are already deployed on the Kubernetes cluster as Sealed secrets and can be unsealed by the Sealed Secret…
Attila
  • 3,206
  • 2
  • 31
  • 44
3
votes
0 answers

How to add an overlay that modifies a Kustomization?

Here's my directory structure: |- base | |- file1.yaml | |- file2.yaml | |- kustomization.yaml |- overlays |- nofile2 |- kustomization.yaml |- nofile2.yaml base/kustomization.yaml: apiVersion: kustomize.config.k8s.io/v1beta1 kind:…
Shaul Behr
  • 36,951
  • 69
  • 249
  • 387
3
votes
1 answer

Extend kustomize image transformer for new types

Is there a way to extend the kustomize image transformer to recognise more keys as image specifiers? Like the nameReference transformer does for the namePrefix and nameSuffix transformers. The Kustomize images: transformer is very useful for image…
Craig Ringer
  • 307,061
  • 76
  • 688
  • 778
3
votes
0 answers

Add new environment variable to every container by Kustomize

Is there any possibility to add (by patch) new environment variable to every container by Kustomize? Currently I can manage to pass it to some containers defined by name but I want not to set the name.
Konstantin Smolyanin
  • 17,579
  • 12
  • 56
  • 56
3
votes
1 answer

Kustomize: how to reference a value from a ConfigMap in another resource/overlay?

I have a couple of overlays (dev, stg, prod) pulling data from multiple bases where each base contains a single service so that each overlay can pick and choose what services it needs. I generate the manifests from the dev/stg/prod directories. A…
unboundedcauchy
  • 113
  • 2
  • 8
3
votes
2 answers

kustomize: how to pass `newTag` as Label

I am using https://kustomize.io/ have below is my kustomization.yaml file, I would like to pass newTag image version to labels on deployment.yaml when i use ArgoCD to apply this file. Does anyone have any idea without using shell script to sed the…
エック
  • 65
  • 2
  • 7
3
votes
1 answer

How to create configMap with .env with Kustomize

I've a NextJS app which needs a .env file mounted. I usually do this with providing a configMap: kind: ConfigMap apiVersion: v1 metadata: name: frontend-configmap namespace: default data: .env: |- NEXT_PUBLIC_API_URL=http://my.domain.com …
Jan
  • 12,992
  • 9
  • 53
  • 89