Kubernetes/kustomize: Difference between revisions
Jump to navigation
Jump to search
(Created page with "== kustomize == kubectl kustomize | Kubernetes https://kubernetes.io/docs/reference/kubectl/generated/kubectl_kustomize/ kubectl kustomize DIR [flags] == kustomization.yaml == <pre> # Apply resources from a directory containing kustomization.yaml - e.g. dir/kustomization.yaml kubectl apply -k dir/ </pre> == keywords ==") |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 11: | Line 11: | ||
# Apply resources from a directory containing kustomization.yaml - e.g. dir/kustomization.yaml | # Apply resources from a directory containing kustomization.yaml - e.g. dir/kustomization.yaml | ||
kubectl apply -k dir/ | kubectl apply -k dir/ | ||
</pre> | |||
== Kustomize == | |||
Kustomize - Kubernetes native configuration management | |||
https://kustomize.io/ | |||
Kustomize introduces a template-free way to customize application configuration that simplifies the use of off-the-shelf applications. Now, built into kubectl as apply -k. | |||
== Hello World == | |||
Hello World | |||
https://github.com/kubernetes-sigs/kustomize/blob/master/examples/helloWorld/kustomization.yaml | |||
<pre> | |||
apiVersion: kustomize.config.k8s.io/v1beta1 | |||
kind: Kustomization | |||
metadata: | |||
name: arbitrary | |||
# Example configuration for the webserver | |||
# at https://github.com/monopole/hello | |||
commonLabels: | |||
app: hello | |||
resources: | |||
- deployment.yaml | |||
- service.yaml | |||
- configMap.yaml | |||
</pre> | </pre> | ||
== keywords == | == keywords == |
Latest revision as of 00:39, 9 February 2024
kustomize
kubectl kustomize | Kubernetes https://kubernetes.io/docs/reference/kubectl/generated/kubectl_kustomize/
kubectl kustomize DIR [flags]
kustomization.yaml
# Apply resources from a directory containing kustomization.yaml - e.g. dir/kustomization.yaml kubectl apply -k dir/
Kustomize
Kustomize - Kubernetes native configuration management https://kustomize.io/
Kustomize introduces a template-free way to customize application configuration that simplifies the use of off-the-shelf applications. Now, built into kubectl as apply -k.
Hello World
Hello World https://github.com/kubernetes-sigs/kustomize/blob/master/examples/helloWorld/kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization metadata: name: arbitrary # Example configuration for the webserver # at https://github.com/monopole/hello commonLabels: app: hello resources: - deployment.yaml - service.yaml - configMap.yaml