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

How to kustomize resouce in k8s?

Assume I have cronjob 、service and deployment just like below: # Create a directory to hold the base mkdir base # Create a base/deployment.yaml cat < base/deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: my-nginx spec: …
Frank AK
  • 1,705
  • 15
  • 28
0
votes
1 answer

Use variable in a patchesJson6902 of a kustomization.yaml file

I would like to set the name field in a Namespace resource and also replace the namespace field in a Deployment resource with the same value, for example my-namespace. Here is kustomization.json: namespace: apiVersion:…
Fabrice Jammes
  • 2,275
  • 1
  • 26
  • 39
0
votes
1 answer

Can't install a specific kustomize version

I am trying to install kustomize v3.2.1 in Mac, but I am getting the following error when I do these steps. wget "https://github.com/kubernetes-sigs/kustomize/archive/refs/tags/kustomize/v3.2.1.tar.gz" Untar the source tar xzf xxxxx.tar.gz cd xxxxxx…
cosmos-1905-14
  • 783
  • 2
  • 12
  • 23
0
votes
1 answer

Patch specific resource in kustomize

I have a base resource that gets imported in an overlay, which in the overlays also makes other resources from the same base but with a different suffix. In the overlay, the base resource needs to be patched without affecting the other newly created…
H. Sánchez
  • 566
  • 6
  • 14
0
votes
1 answer

Automated way to create multiple kubernetes Job manifests

Cron template kind: CronJob metadata: name: some-example namespace: some-example spec: schedule: "* 12 * * *" jobTemplate: spec: template: spec: containers: - name: some-example image:…
Rahul Sharma
  • 779
  • 2
  • 12
  • 27
0
votes
2 answers

Kusto.Explorer requires secondary account to access azure Log Analytics workspace

I am having a challenge accessing azure LA/AI workspace with desktop Kusto.Exploer. I cannot use RUNAS to invoke my secondary account with credentials, accessing workspace in azure. Note that I am able to do that using dataexplorer.azure.com ( since…
0
votes
1 answer

What's the equivalent of "kubectl apply -k" in terraform?

I want to use EFS in my EKS cluster. I'm following this eks workshop. I need to deploy EFS CSI Driver using kustomize: kubectl apply -k "github.com/kubernetes-sigs/aws-efs-csi-driver/deploy/kubernetes/overlays/stable/?ref=release-1.0" What's the…
HsnVahedi
  • 1,271
  • 3
  • 13
  • 34
0
votes
1 answer

Is it possible to deploy kustomize command with cloud build on GKE of GCP?

If deploy with filename on GKE, Supported builder images provided by Cloud Build can be found from official. Also can found full list. But both gke-deploy or kubectl can't suite my requirement. I want to run a command like kustomize build…
0
votes
1 answer

Mounting a k8s secret using kustomize

I've been searching for a while, but I'm pretty new to kustomize. It's taken me a while to get my head around the concept of overlays etc. I'm trying to use a kustomization file to mount an existing secret into the pod. I can't do it in the…
jonnybinthemix
  • 637
  • 1
  • 9
  • 29
0
votes
1 answer

Is it possible to compose a Kustomize file?

I would like to define the yaml for a particular container in one file, then pull that container config into a deployment config when the depyment is built. Is it possible to do this, since a lone container is not a Kubernetes resource?
EMC
  • 1,560
  • 2
  • 17
  • 31
0
votes
1 answer

Factoring out common components when kustomizing kubernetes manifests

I'm using kustomize binary to craft specific kubernetes deployment yaml files. {Version:kustomize/v3.8.1 GitCommit:0b359d0ef0272e6545eda0e99aacd63aef99c4d0 BuildDate:2020-07-16T00:58:46Z GoOs:linux GoArch:amd64} Here is my directory…
JamesD
  • 679
  • 10
  • 36
0
votes
1 answer

Conftest Exception Rule Fails with Kustomization & Helm

I'm having in one of my projects several k8s resources which is built, composed and packaged using Helm & Kustomize. I wrote few OPA tests using Conftest where one of the check is to avoid running containers as root. So here is my deployment.yaml in…
joesan
  • 13,963
  • 27
  • 95
  • 232
0
votes
1 answer

Manage k8s secrets with Kustomize for microservices

Kustomize secrets seem to work fine in a mono-repo scenario with all the deployment config together. How does one deal with microservices where each component is in its own repo? I could move the manifests together in a devops repo, but seems odd to…
Jason Leach
  • 3,889
  • 7
  • 37
  • 54
0
votes
1 answer

Reference secrets from base in overlay

Is there any way in Kustomize to reference a secret, which has been generated and is used in my base, to another resource (e.g. Deployment or StatefulSet) in my overlay? I face the problem, that all occurences of the secrets name are replaced by the…
autopwn
  • 3
  • 1
0
votes
1 answer

k8s create ephemeral copies of a pod

I'd like to create a copy of a k8s pod on the fly, and patch it with some custom configurations. Unfortunately, I don't really know where to start from... my-service - kustomization.yaml - deployment.yaml And then kubectl apply -k…