namePrefix is self explanatory, it helps adding prefix to names in the defined yaml files.
# deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: the-deployment spec: replicas: 5 template: containers: - name: the-container image: registry/conatiner:latest
# kustomization.yaml apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization namePrefix: custom-prefix- resources: - deployment.yaml
apiVersion: apps/v1 kind: Deployment metadata: name: custom-prefix-the-deployment spec: replicas: 5 template: containers: - image: registry/conatiner:latest name: the-container
Apply will propagate the
namePrefix to any place Resources within the project are referenced by other Resources
- Service references from StatefulSets
- ConfigMap references from PodSpecs
- Secret references from PodSpecs
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.