c469c84a26
Also updated Datadog questions.
676 B
676 B
Kustomize - Common Labels
Requirements
- Running Kubernetes cluster
- Kustomize binary installed
Objectives
In the current directory there is an app composed of a Deployment and Service.
- Write a kustomization.yml file that will add to both the Service and Deployment the label "team-name: aces"
- Execute a kustomize command that will generate the customized k8s files with the label appended
Solution
- Add the following to kustomization.yml in someApp directory:
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
commonLabels:
team-name: aces
resources:
- service.yml
- deployment.yml
- Run
kustomize build someApp