Library Overview


In library-mode, k8s.mk is used as an include from your project Makefile (see the installation docs for more details). After including k8s.mk, you'll have access to:

  1. The full capabilities of the parent project, i.e. compose.mk
  2. Scaffolded targets for each k8s-tools.yml tool container
  3. The k8s.mk automation library, which offers many reusable static targets that you can call directly use from the command line, or use programmatically, as part of normal tasks/prereqs inside your project Makefile.

Module Layout


Here's an overview for how the k8s.mk library is organized into modules: you can dive into the module or target-level documentation anywhere that looks interesting. If you prefer a more guided tour, check out the rest of this page for a few of the random highlights.

Module Layout

k8s.* targets:
General cluster tools, many of which are just wrappers for kubectl. Focusing especially on waiting on resources, retrieving resource details, and applying manifests from files or streams. Targets here are container-agnostic; if called from the host, requests are routed to appropriate tool containers.
kubectl.* targets:
Low-level helpers for k8s.*, these targets either require kubectl/helm, or should be called only from inside containers.
ansible.* targets:
Adhoc-ansible, exposed directly as make-targets. As usual, this does not require ansible on the docker host, and can be used from the CLI or as prerequisites in recipes.
argo.* targets:
Placeholder
fission.* targets:
Placeholder
k3d.* targets:
Placeholder
kubefwd.* targets:
Placeholder
minikube.* targets:
Placeholder