Bespoke Application

Workflow for bespoke applications

In this workflow, all configuration (resource YAML) files are owned by the user. No content is incorporated from version control repositories owned by others.

bespoke config workflow image

1) 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

2) create a base

mkdir -p ~/ldap/base

In this directory, create and commit a kustomization file and a set of resources.

3) 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.

4) 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

Last modified June 7, 2020: Convert docs to docsy (42497c66)