Kubectl kustomize: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 26: | Line 26: | ||
<font color=burlywood># add the specified common prefix to all resource names</font> | <font color=burlywood># add the specified common prefix to all resource names</font> | ||
namePrefix: <font color=teal>blue-</font> | namePrefix: <font color=teal>blue-</font> | ||
<font color=burlywood># ?</font> | |||
namespace: ... | |||
<font color=burlywood># ?</font> | |||
images: | |||
- name: <font color=teal>something</font> | |||
newTag: <font color=teal>some-new-tag</font> | |||
<font color=burlywood># ?</font> | |||
patchesStrategicMerge: | |||
- patch-file.yaml | |||
resources: | resources: | ||
- deployment-manifest.yaml | - deployment-manifest.yaml | ||
- configmap-manifest.yaml | - configmap-manifest.yaml | ||
- service-manifest.yaml | - service-manifest.yaml | ||
=TODO= | =TODO= | ||
<font color=darkgray>It seems to add prefixes to names, update image tags, adds namespace metadata, "yaml-cleans" according to rules that have yet to be elucidated.</font> | <font color=darkgray>It seems to add prefixes to names, update image tags, adds namespace metadata, "yaml-cleans" according to rules that have yet to be elucidated.</font> |
Revision as of 17:56, 23 August 2019
External
- https://kubernetes.io/blog/2018/05/29/introducing-kustomize-template-free-configuration-customization-for-kubernetes/
- https://github.com/kubernetes-sigs/kustomize
Internal
Overview
The "kustomize" logic reads a series of source API resource manifests, instructions from a kustomization.yaml file and generates syntactically valid and complete API resource manifests at stdout. The generated content may contain multiple resource representations, separated by ---. The output can be further processed by other tools or streamed directly into kubectl for deployment to a cluster.
kubectl kustomize <dirname> > output.yaml
The directory specified as argument must contain kustomization.yaml.
A kustomization.yaml example follows:
# add the specified labels to all resources commonLabels: app: hello # add the specified annotations to all resources commonAnnotations: ... # add the specified common prefix to all resource names namePrefix: blue- # ? namespace: ... # ? images: - name: something newTag: some-new-tag # ? patchesStrategicMerge: - patch-file.yaml resources: - deployment-manifest.yaml - configmap-manifest.yaml - service-manifest.yaml
TODO
It seems to add prefixes to names, update image tags, adds namespace metadata, "yaml-cleans" according to rules that have yet to be elucidated.