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
1
vote
0 answers

Keep permanent IP for ingress-nginx (and using kustomize)

Problem On a fresh Kubernetes cluster, I want to configure an nginx ingress with a public IP that remains stable, regardless of later changes to the nginx ingress controller; ie. I want to be able to delete and restore the ingress without changes to…
Christian Fuchs
  • 430
  • 3
  • 9
1
vote
2 answers

Kustomize best practice to apply the same patch to multiple base files

I have an application with different versions. The base resource file for each version is slightly different. But the patch which needs to be applied to the base file is same. What should be the best structure to apply the same patch to different…
JoyceLee
  • 85
  • 3
  • 11
1
vote
0 answers

Kustomize prefix/suffix transformer for custom variable in Ingress object

I'm trying to configure kustomize so it adds a suffix to my tls secret name, I've got the following configuration: nameSuffix: - kind: Ingress path: /spec/tls/0/secretName This is my ingress manifest: apiVersion: networking.k8s.io/v1 kind:…
hY8vVpf3tyR57Xib
  • 3,574
  • 8
  • 41
  • 86
1
vote
1 answer

Configuring RBAC for kubernetes

I used the following guide to set up my chaostoolkit cluster: https://chaostoolkit.org/deployment/k8s/operator/ I am attempting to kill a pod using kubernetes, however the following error: HTTP response body:…
1
vote
1 answer

How to specify context with Flux in Kubernetes cluster?

I am following Kustomize helm example With original tutorial command flux bootstrap github --context=staging --owner=${GITHUB_USER} --repository=${GITHUB_REPO} --branch=main --personal --path=clusters/staging I got ✗ context "staging" does not…
Richard Rublev
  • 7,718
  • 16
  • 77
  • 121
1
vote
0 answers

multiple kubernetes deployments using same global yaml as template

I have ran into an issue. My goal: Create multiple nginx deployments using the same "template" file and use kustomize to replace the container name. This is just an example, as in the next steps I will add/replace/remove lines (for eg.: resources)…
1
vote
1 answer

What does - means in kubectl -f -

What does the last - (following -f) mean in the following command: kustomize build config/samples | kubectl apply -f -
Mike
  • 1,841
  • 2
  • 18
  • 34
1
vote
2 answers

How to set label on secret created by ServiceAccount?

Is there any way to set label on secret created by ServiceAccount? For now it is the only secret I'm not able to configure with label. apiVersion: v1 kind: ServiceAccount metadata: name: forum-sa
dnf
  • 1,659
  • 2
  • 16
  • 29
1
vote
0 answers

Patching multiple resources with Kustomize

I have a kustomization.yaml file defined which consists of two resources that are downloaded from a git repo. Both of these resources want to create a Namespace with the same name, which creates an error when I try to build the final kustomization…
dywan666
  • 385
  • 8
  • 14
1
vote
1 answer

Unable to remove a "Sizelimit" property using kustomize

I have sizeLimit property under emptyDir set to 2Gi in my template base file. I want to remove the sizelimit and just have emptyDir: {}. I've been unable to achieve this using Kustomization overlays. I will detail my folder structure and…
vishal
  • 1,646
  • 5
  • 28
  • 56
1
vote
2 answers

Is there a way to update or merge string literals with kustomize?

I'm trying to manage Argo CD projects with helm definitions using kustomize. Unfortunately Argo manages helm values with string literals, which gives me headaches in conjunction with kustomize configuration. I have this…
schrom
  • 1,372
  • 1
  • 22
  • 36
1
vote
1 answer

Kustomize using Strategic Merge patch on helmreleases

We keep in our Flux repo our HelmReleases. We use Kustomize to edit some of the keys in the HelmReleases. I tried using Strategic Merge patch in order to append a value into a list but instead the list was overwritten (which is the default it…
JeyJ
  • 3,582
  • 4
  • 35
  • 83
1
vote
2 answers

Kustomize patch with string literal: Double quotes replaced with single quotes

When adding a kustomize patch to a kustomization.yaml the double quotes are replaced with single quotes that lead to error I am using the following: kustomize edit add patch --patch "- op: add\n path:…
mbbce
  • 2,245
  • 1
  • 19
  • 31
1
vote
0 answers

Adjusting spec/destination in ArgoCD Application with kustomize

I am relatively new to kustomize and am trying to work out how I can use it to adjust the destination namespace/server in a argocd Application resource. The resource is defined as below: apiVersion: argoproj.io/v1alpha1 kind: Application metadata: …
Ben
  • 9
  • 1
1
vote
2 answers

How to update image tag in helm values.yaml with Kustomize and GitHub actions?

I am applying the app-of-apps with Argo CD on my application deployments, where I have a directory with the applications definitions, and then a directory with resource definitions and a kustomization.yaml file. When a new version is released, all I…
everspader
  • 1,272
  • 14
  • 44