Configuration


For many simple use-cases, the k8s-tools suite only wants the familiar environment variables that your tools require, and in particular things like KUBECONFIG, AWS_PROFILE are inherited as usual from the calling environment.

Although in practice most things have defaults, each component of the k8s-tools suite supports some kind of configuration injection that might be needed for advanced use-cases. Below you can find sections for each of k8s-tools.yml, k8s.mk, and compose.mk that describe the relevant environment variables.

In a few cases and hopefully for good reasons, configuration might sometimes involve editing some part of the k8s-tools suite in-place. For example, k8s-tools.yml needs to specify file volumes, and while it does share KUBECONFIG by default, sharing directories like ~/.aws and ~/.ssh are commented by default, and users must explicitly opt-in. As another example, editing the particulars of the embedded TUI should not be necessary, but is easily done if you're willing to reach into compose.mk source. See also this discussion of forking included as part of the integration docs

k8s-tools.yml


There are two main ways to configure the compose file that defines tool containers: you can override tool versions, or you can set defaults for docker

Versions


Here's a list of version defaults in k8s-tools.yml currently:

ALPINE_K8S_VERSION=alpine/k8s:1.30.0
CDK_CLI_VERSION=2.149.0
KN_CLI_VERSION=v1.14.0
DEBIAN_CONTAINER_VERSION=debian:bookworm
HELMIFY_CLI_VERSION=v0.4.12
FISSION_CLI_VERSION=v1.20.1
KOMPOSE_CLI_VERSION=v1.33.0
ARGO_CLI_VERSION=v3.4.17
KUBEFWD_VERSION=1.22.5
K3D_VERSION=v5.6.3
KIND_CLI_VERSION=v0.23.0
K9S_VERSION=v0.32.4
RANCHER_CLI_VERSION=v2.8.4
PROMETHEUS_CLI_VERSION=v2.52.0
ANSIBLE_VERSION=10.1.0
KUBECTL_CLI_VERSION=v1.30.0
HELM_CLI_VERSION=v3.14.4

Docker


If you're using compose.mk or k8s.mk directly or as an include, these variables are set for you automatically from a best-guess when they are not provided.

If you're using ./k8s-tools.yml .. directly or via docker compose -f k8s-tools.yml, defaults assume values compatible with Linux, and may or may not work with MacOS!

DOCKER_GID
DOCKER_HOST_WORKSPACE
DOCKER_SOCKET
DOCKER_UGNAME
DOCKER_UID

compose.mk


General Environment Variables


Variable Meaning
CMK_COMPOSE_FILE Temporary file used for the embedded-TUI
verbose: 1 if normal debugging output should be shown, otherwise 0
CMK_DIND Determines whether docker-in-docker is allowed
CMK_INTERNAL 1 if dispatched inside container, otherwise 0
CMK_SUPERVISOR 1 if supervisor/signals is enabled, otherwise 0
COMPOSE_IGNORE_ORPHANS Honored by 'docker compose', this helps to quiet output
DOCKER_HOST_WORKSPACE Needs override for correctly working with DIND volumes
TRACE: Increase verbosity (more detailed than verbose)

TUI Environment Variables


Variable Name Description
TUI_BOOTSTRAP *Target-name that is used to bootstrap the TUI. *
TUX_BOOTSTRAPPED Contexts for which the TUI has already been bootstrapped.
TUI_SVC_NAME The name of the primary TUI svc.
TUI_THEME_NAME The name of the theme.
TUI_TMUX_SOCKET The path to the tmux socket.
TUI_THEME_HOOK_PRE Target called when init is in progress but the core layout is finished
TUI_THEME_HOOK_POST Name of the post-theme hook to call. This is required for buttons.


Here's a list of environment variables related to the TUI, as generated by the `./compose.mk io.env/TUI` command.  

These variables have slightly different values for `compose.mk io.env/TUI` vs `k8s.mk io.env/TUI`, which demonstrates how to extend the base tux container.

```ini 
TUI_SVC_NAME=tux
TUI_TMUX_SESSION_NAME=tui
TUI_BOOTSTRAP=tux.require
TUI_SVC_BUILD_ORDER=dind_base,tux
TUI_THEME_HOOK_PRE=.tux.init.theme
TUI_THEME_NAME=powerline/double/green
TUI_COMPOSE_FILE=.tmp.compose.mk.yml
TUI_THEME_HOOK_POST=.tux.init.buttons
TUI_INIT_CALLBACK=.tux.init
TUI_TMUX_SOCKET=/socket/dir/tmux.sock
TUI_CONTAINER_IMAGE=compose.mk:tux

k8s.mk


The main configuration that's expected with k8s.mk is always KUBECONFIG.