In this workflow, all configuration (resource YAML) files are owned by the user. No content is incorporated from version control repositories owned by others.
Following are the steps involved:
Create a directory in version control
Speculate some overall cluster application called ldap; we want to keep its configuration in its own repo.
git init ~/ldap
Create a base
mkdir -p ~/ldap/base
mkdir -p ~/ldap/overlays/staging mkdir -p ~/ldap/overlays/production
The staging directory might get a patch that turns on an experiment flag in a configmap.
The production directory might get a patch that increases the replica count in a deployment specified in the base.
Bring up variants
Run kustomize, and pipe the output to apply.
kustomize build ~/ldap/overlays/staging | kubectl apply -f - kustomize build ~/ldap/overlays/production | kubectl apply -f -
kubectl apply -k ~/ldap/overlays/staging kubectl apply -k ~/ldap/overlays/production
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.