Cloud Fortgeschritten
Kustomize — K8s-Konfiguration ohne Templates¶
KustomizeKubernetesGitOps 3 Min. Lesezeit
Kustomize für Overlay-basierte Kubernetes-Konfigurationen. Base, Overlays und Patches.
Struktur¶
k8s/
├── base/
│ ├── kustomization.yaml
│ ├── deployment.yaml
│ └── service.yaml
└── overlays/
├── dev/
│ └── kustomization.yaml
└── prod/
└── kustomization.yaml
Beispiele¶
# base/kustomization.yaml
resources:
- deployment.yaml
- service.yaml
# overlays/prod/kustomization.yaml
resources:
- ../../base
namePrefix: prod-
patches:
- patch: |-
- op: replace
path: /spec/replicas
value: 5
target:
kind: Deployment
kubectl apply -k overlays/prod/
Zusammenfassung¶
Kustomize = Template-freie Konfiguration. Bestandteil von kubectl, keine zusätzliche Installation nötig. Hervorragend mit GitOps.
Brauchen Sie Hilfe bei der Implementierung?¶
Unser Team hat Erfahrung mit dem Entwurf und der Implementierung moderner Architekturen. Wir helfen Ihnen gerne.