8

Using kubectl apply -k, you can overlay Resource configs (that you have already defined). Can you create resources as well?

In my specific case I want to create a local Volume for the development environment. I do not have this Resource in the base folder though.

My folder structure is like this:

~/someApp
├── base
│   ├── deployment.yaml
│   ├── kustomization.yaml
│   └── service.yaml
└── overlays
    ├── development
    │   ├── cpu_count.yaml
    │   ├── kustomization.yaml
    │   ├── replica_count.yaml
    │   └── volume.yaml <--- *Is this possible*?
    └── production
        ├── cpu_count.yaml
        ├── kustomization.yaml
        └── replica_count.yaml
ITChap
  • 4,057
  • 1
  • 21
  • 46
Tom
  • 4,776
  • 2
  • 38
  • 50

1 Answers1

14

In your overlays/development/kustomization.yaml you can add:

resources:
  - volume.yaml
ITChap
  • 4,057
  • 1
  • 21
  • 46