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

Is it possible to get container host path from environment variable?

I am trying to set configurable host paths in kubernetes, but I am facing issues. I created a config map, which has the path and then I'm trying to replace the placeholder with the config map value. Here is my configuration: apiVersion:…
norbit
  • 1
  • 3
0
votes
1 answer

Create per-file Kubernetes secrets from a directory of text files in Kustomize

I have a number of secret "environment variables" I want to get into a kubernetes cluster. Currently, I have a directory of these secrets where each var has a corresponding file named the same way as the variable it is supposed to be assigned to.…
Ben
  • 4,980
  • 3
  • 43
  • 84
-1
votes
1 answer

Kustomize error: base/file is not or below env/main/file

I am trying to apply kustomize from env/main/kustomization.yaml directory kubectl diff --kustomize . which gives error: `: security; file 'base/replacements/xxxx.yaml' is not in or below 'env/main' The above kustomization is applied on the base…
Jatin Mehrotra
  • 9,286
  • 4
  • 28
  • 67
-1
votes
1 answer

Can I define secretStoreRef's name of a ExternalSecret in my configMap?

I have an ExternalSecret definition pulling secrets from Azure key vault. apiVersion: external-secrets.io/v1beta1 kind: ExternalSecret name: my-es spec: dataFrom: - find: ... copy some values over secretStoreRef: kind: SecretStore …
cp5
  • 1,087
  • 6
  • 26
  • 58
-1
votes
1 answer

Kustomize to do HPA version upgrade

I m trying to write a kustomize patch for HPA version from autoscaling/v2beta2 to autoscaling/v1 . I am able to change the version with the following patch patches: - patch: |- - op: replace path: "/apiVersion" value: autoscaling/v1 …
Vini
  • 1,978
  • 8
  • 40
  • 82
-1
votes
1 answer

Kustomize: Patch multiple resources that starts with same name

I want to patch multiple deployments that starts with same namePrefix instead of targeting specific resource. For example, I have 2 deployments of nginx deployment-v1.yaml and deployment-v2.yaml. I want to patch both the deployment using nginx-…
-1
votes
1 answer

Error: trouble configuring builtin PatchTransformer with config

I ran into this problem. I have metadata.name. But I have no more ideas how to solve this problem. This kustomize used to work, but lately it just refuses to work. Can you please advise me Client Version: v1.25.2 Kustomize Version: v4.5.7 This is…
ToomIm
  • 1
-1
votes
1 answer

How to create an empty run of kustomize in Openshift or Kubernetes?

I have a Kubernetes project that uses Kustomize functionality. Basically, the directory structure is like follows: + base + + +- kustomize.yml + +- a.yml + + overlays + +--- serverA + +- kustomize.yml …
-1
votes
1 answer

Kustomize HTTP resource with patch not working

I have a Kustomize v5.0.0 project with the following layout: ├── base │ ├── kustomization.yaml │ ├── foo │ ├── kustomization.yaml │ │ └── overlay ├── kustomization.yaml ├── foo ├── kustomization.yaml ├──…
Boon
  • 1,073
  • 1
  • 16
  • 42
-1
votes
1 answer

Kubernetes kustomize with prometheus

I have multiple environments where we define prometheus alerts, and these alerts have the same labels and description among environments, they just differ in the expression and priority. I am currently using Kustomize with the following…
Homer
  • 85
  • 7
-1
votes
1 answer

kustomize not replacing deployed pods

there's probably something i'm not understanding about kustomize but using a simple kustomize edit set image ... followed by kustomize build . | kubectl apply -f - is actually creating duplicate pods rather than replacing pods. It's supposed to be…
Naji
  • 674
  • 2
  • 14
  • 35
-1
votes
1 answer

Kubernetes one image for many cronjobs with kustomize

I have git repo with my cronjobs yaml files. I want to use kustomize to set image in one place and apply it to all yaml. How to do this with kustomize? My files: cronjobs/ ├─ cronone/ │ \─ cronone.yaml ├─ crontwo/ │ \─ crontwo.yaml ├─ cronthree/ │…
Rafał Kot
  • 1,064
  • 3
  • 15
  • 26
-1
votes
1 answer

How do I pass resources that were created by Terraform to Kustomize

Am using a combination of these tools Terraform - To deploy the Application specific AWS resources I need (For instance a secret) Skaffold - To help with the inner development loop, surrounding the deployment of K8s resources to local and remote…
Karthik Balasubramanian
  • 1,127
  • 4
  • 13
  • 36
-1
votes
1 answer

Is there a DRY way to patch multiple resources using kubectl v1.17?

I'm working under some restrictions, outside of my control, namely the CI/CD pipeline and the infrastructure in general. I've been testing my kustomizations on my local console which has v1.21, but my pipeline is running v1.17. So components are…
Mxt
  • 166
  • 2
  • 17
-1
votes
1 answer

Kustomize apply one patch to multiple resource types (to add ownerReferences)

I'm trying to use kustomize to apply a patch that adds ownerReferences to all resources in the base I want to do something like this: # kustomization.yaml resources: - deployment.yaml - svc.yaml secretGenerator: - name: mysecret files: -…
Bob
  • 1
  • 2
1 2 3
24
25