0

i did with success some kustomize for multi-evironnements on a files tree like :

├── base
│   ├── deployment.yaml
│   ├── kustomization.yaml
│   ├── service.yaml
├── overlays
│   ├── prod
│   │   ├── application.properties
│   │   ├── kustomization.yaml
│   └── uat
│       ├── application.properties
│       ├── kustomization.yaml

but id'like to add now auto generation of an ingress ressource, in a tree similar as..

├── base
│   ├── deployment.yaml
│   ├── kustomization.yaml
│   ├── service.yaml
│   ├── ingress.yaml <============ added template
├── overlays
│   ├── prod
│   │   ├── application.properties
│   │   ├── kustomization.yaml
│   └── uat
│       ├── application.properties
│       ├── kustomization.yaml

Is it possible ? Does anybody has a snippet or tricks to do that ?

in my prod overlay, my kustomization.yaml file is :

bases:
- ../../base

namespace: prod 

patches:
- replicas.yaml

configMapGenerator:
- name: application.properties
  files: 
  - application.properties=application.properties

but when i launch my command

kubectl apply -k . 

it does not create my Ingress ressource (only configmap, service and deployment)

So: how does it work ?

  • 1
    Kustomize only includes resources that are explicitly listed in the `resources` section of a `kustomization.yaml` file. In your example, I don't see where you're listing the `ingress.yaml` file. – larsks Feb 23 '23 at 23:00
  • absolutly exact. fixed it by add the ingress yaml file. – it.drive.view Feb 27 '23 at 13:34

0 Answers0