Different Types of Patches
Different Types of Patches
- The first method is
inline- you define the patch within thekustomization.yamlfile like this: ``` patches:- target:
kind: Deployment
name: api-deployment
patch: |-
- op: replace path: /spec/replicas value: 5 ```
- target:
kind: Deployment
name: api-deployment
patch: |-
-
The other method is using a separate file. Can give path to yaml file that contains all patches.
- The
Kustomization.yamlwould look like this:
- The
patches:
- path: replica-patch.yaml
target:
kind: Deployment
name: nginx-deployment
- The
replica-patch.yamlwould look like this:
- op: replace
path: /spec/replicas
value: 5