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
3
votes
3 answers

Kustomize: Set attribute value from file or URI

I want to have a Kustomize manifest where value for some attribute comes from entire contents of some file or URI. How can I do this?
Ark-kun
  • 6,358
  • 2
  • 34
  • 70
3
votes
1 answer

Combining multiple k8s kustomizations into one

In Kubernetes I have a base kustomize package, and two patches to it, each patch adjusting a different aspect of the base - one for large deployment, and another to use a legacy image rather than the current one. Is there a way I can create a…
Yuri Astrakhan
  • 8,808
  • 6
  • 63
  • 97
3
votes
4 answers

How to get resolved sha digest for all images within Kubernetes yaml?

Docker image tags are mutable, in that image:latest and image:1.0 can both point to image@sha256:....., but when version 1.1 is released, image:latest stored within a registry can be pointed to an image with a different sha digest. Pulling an image…
John
  • 10,837
  • 17
  • 78
  • 141
3
votes
1 answer

adding yaml array as env to kubernetes/kustomize

So, I have a yaml file that looks like this: service: users: - username: some-user password: some-pass (would be placed in Secret) - username: some-user password: some-pass (would be…
nirvair
  • 4,001
  • 10
  • 51
  • 85
3
votes
1 answer

Is kustomize for k8s backward chaining?

The README for kustomize says that It's like make, in that what it does is declared in a file, and it's like sed, in that it emits edited text. Does this analogy extend beyond the fact that files are used to declare what is needed? Or, is…
Rob Wells
  • 36,220
  • 13
  • 81
  • 146
2
votes
1 answer

How to add init container with kustomize

I want to add an initContainer to all of my pods (with a specific annotation) in my kustomize base. The newly added init container should be the first init container. My patch looks like this. patches: - target: kind: Pod …
briconaut
  • 322
  • 1
  • 3
  • 12
2
votes
0 answers

Migrating StorageClass from gp2 to gp3 - AWS EKS

We are using EKS and we have a stateful set that uses a storage class as volumeclaimtemplates. Our storage classes are of type gp2 and is using the ebs.csi.aws provisioner. We need to convert the sc's from gp2 - gp3 without any downtime. Is it…
2
votes
1 answer

Why ArgoCD does not kustomize resources?

I want to add sync-wave annotations using Kustomize and then deploy resources using ArgoCD. I expect that ArgoCD will kustomize resources first and then apply them to a cluster. However ArgoCD try to create (apply) the Kustomize resource itself in a…
Michael Chudinov
  • 2,620
  • 28
  • 43
2
votes
1 answer

How can I add nodePort in Kustomize overlays?

I have a Kustomize like below: ├── base │ ├── kustomization.yaml | ├── deployment.yaml │ └── service.yaml └── overlays └── development ├── kustomization.yaml └── service.yaml I want to define my-service as NodePort, and…
Ellisein
  • 878
  • 6
  • 17
2
votes
3 answers

how to change a value of element on kustomize.yaml using github actions

if i having this kustomize.yaml file : apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization patches: - patch: |- - op: replace path: /spec/rules/0/host value: the.new.domain.com target: kind: Ingress name:…
stack acc
  • 21
  • 1
2
votes
0 answers

How can I inject environment variables for kustomize from argocd application-set Pull Request Generator

In Argo - ApplicationSet Controller there is a "Pull Request Generator". I would like to get the pull request number, git sha - "{{number}}" {{head_sha}} in a configMap. I am using kustomize. and I am trying to use the configMapGenerator cat <
Adrian I
  • 113
  • 1
  • 6
2
votes
1 answer

Using templating/overlay libraries in operators

While building operators using OperatorSDK: Go framework, we end up creating Kubernetes resources such Deployments, Services etc programmatically by leveraging structs from k8s modules/packages. Compared to creating these manifests in yaml/json…
dinup24
  • 1,652
  • 3
  • 16
  • 26
2
votes
0 answers

how to patch selector and label service name of deployment.yaml in kustomization.yaml

My Setup: GitHub(Build Pipeline) + Kustomize + Kubernetes Kustomize structure: --base ----deployment.yaml ----service.yaml ----kustomizationn.yaml --env-country1 ----kustomizationn.yaml --env-country2 ----kustomizationn.yaml Issue: I am trying to…
Prabhat Mishra
  • 951
  • 2
  • 12
  • 33
2
votes
1 answer

Kustomize structure for different environments and cloud providers

I have a scenario and was wondering the best way to structure it with Kustomize. Say I have multiple environments: dev, qa, prod and say I have multiple DCs: OnPrem, AWS, GCP Let's say each DC above has a dev, qa, prod environment. I have data that…
CodyK
  • 3,426
  • 4
  • 36
  • 52
2
votes
2 answers

Can you patch an arbitrary resource with no base via kustomize?

I've been trying to patch a Deployment, declared and applied by a kops addon (Ebs drivers). Unfortunately, after trying the variety of patching strategies, it seems that I am unable to patch a resource that doesn't have a base declared in my folder…
H. Tazi
  • 76
  • 5