Bespoke Application
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
In this directory, create and commit a kustomization file and a set of resources.
-
Create overlays
mkdir -p ~/ldap/overlays/staging mkdir -p ~/ldap/overlays/production
Each of these directories needs a kustomization file and one or more patches.
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 -
You can also use kubectl-v1.14.0 to apply your variants.
kubectl apply -k ~/ldap/overlays/staging kubectl apply -k ~/ldap/overlays/production
Feedback
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.