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

Following are the steps involved:

  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 October 31, 2020: docs render fix (cd35140)