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

Access environment variables set by configMapRef in kubernetes pod

I have a set of environment variables in my deployment using EnvFrom and configMapRef. The environment variables held in these configMaps were set by kustomize originally from json files. spec.template.spec.containers[0]. envFrom: - secretRef: …
2
votes
1 answer

patch kubernetes cronjob with kustomize

I am trying to patch a cronjob, but somehow it doesn't work as I would expect. I use the same folder structure for a deployment and that works. This is the folder structure: . ├── base │ ├── kustomization.yaml │ └── war.cron.yaml └── overlays …
The Fool
  • 16,715
  • 5
  • 52
  • 86
2
votes
1 answer

Kustomize stuck deleting StatefulSets that uses PersistentVolumes

I am using Kustomize to manage my Kubernetes project with a StetefulSet that deploys a PostgreSQL cluster with three pods. I am working on Vagrant/VirtualBox so no dynamic provisioning of PV exists. For this reason, I have my own pv.yaml containing…
Salvatore D'angelo
  • 1,019
  • 3
  • 14
  • 39
2
votes
1 answer

Kustomize - Create multi and single deployment using same namespace

Kustomize directory structure ├── base │   ├── deployment.yaml │   └── kustomization.yaml └── overlays └── prod ├── kustomization.yaml ├── namespace-a │   ├── deployment-a1 │   │   ├── kustomization.yaml …
Arian
  • 465
  • 1
  • 7
  • 18
2
votes
1 answer

kustomize suffix hashes on only certain items

i have a kustomize environment where there are certain configMaps and secrets that i do want to be "version controlled" and have the suffix hash appended to them. however, i also would like certain configMapGenerator items that should not have the…
yee379
  • 6,498
  • 10
  • 56
  • 101
2
votes
2 answers

Patch namespace and change resource kind for a role binding

Using kustomize, I'd like to set namespace field for all my objects. Here is my kustomization.yaml: apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization patchesJson6902: - patch: |- - op: replace path: /kind value:…
Fabrice Jammes
  • 2,275
  • 1
  • 26
  • 39
2
votes
1 answer

How to replace the in-memory storage with persistent storage using kustomize

I'm trying to replace the in-memory storage of Grafana deployment with persistent storage using kustomize. What I'm trying to do is that I'm removing the in-memory storage and then mapping persistent storage. But When I'm deploying it then it is…
metadata
  • 1,139
  • 1
  • 7
  • 28
2
votes
3 answers

using ConfigMap created using Generator in Kustomize/Kubernetes

I have been trying to figure out how to consume a ConfigMap created using a ConfigMap generator via Kustomize. When created using Kustomize generators, the configMaps are named with a special suffix. See…
user3123834
  • 21
  • 1
  • 2
2
votes
1 answer

How to use Kustomize and create an env like: "http://${namePrefix}service-a/some-path" or "jdbc:db2://${namePrefix}service-b:${dbPort}/${dbName}"

Lets say I need to create environment variables or ConfigMap entries like this: - name: JDBC_URL value: "jdbc:db2://alice-service-a:50000/db1" - name: KEYCLOAK_BASE_URL value: "http://alice-keycloak:8080/auth" Where alice- is the namePrefix.…
Peter V. Mørch
  • 13,830
  • 8
  • 69
  • 103
2
votes
2 answers

Way to stop deploy wrong kubernetes environment

We have a set of kubernetes yamls which is management by kustomize and they will be deployed to different clusters. Each cluster is slightly different which means every environment will have a sub directory (environ/) including some special…
aisensiy
  • 1,460
  • 3
  • 26
  • 42
2
votes
0 answers

Have the re-install Homebrew and software from Homebrew each time I close and restart the terminal

I'm very new to devops and currently working with Homebrew and Kubernetes. The problem I'm facing is that I have to install software like kubectl or kustomize each time I close and restart the terminal (I'm using Ubuntu terminal on Windows 10). If I…
Ali
  • 31
  • 1
  • 4
2
votes
1 answer

How can i add a Serviceaccout using kubectl patch to existing Clusterrolebinding

This is my existing clusterrolebinding apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: example-role roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: test-role subjects: - kind:…
Pratheesh
  • 565
  • 4
  • 19
2
votes
1 answer

How to connect nats streaming cluster

I am new to kubernetes and trying to setup nats streaming cluster. I am using following manifest file. But I am confused with how can I access nats streaming server in my application. I am using azure kubernetes service. --- apiVersion: v1 kind:…
Thecoder
  • 51
  • 2
  • 6
2
votes
1 answer

Modifying Environmental Variables of Helm Chart Dependencies without Forking

I am creating a Helm chart that depends on several Helm charts that are not maintained by me, and I would like to make some configurations to these subcharts. The configurations are not too complex, I just want to add a several environmental…
James Mchugh
  • 994
  • 8
  • 26
2
votes
2 answers

Sharing patches between kustomize overlays - does not recognise transformers

I'm trying to share JSON patches between overlays. I could do something like: bases: - ../bases patchesJson6902: - target: ... But I'd have to copy the full target for each overlay. I'd prefer to describe the target and patch in one place, then…