Skip to main content
Version: 2.28 (prerelease)

k8s


Kubernetes options

Backend: pants.backend.experimental.k8s

Config section: [k8s]

Basic options

available_contexts

--k8s-available-contexts="['<str>', '<str>', ...]"
PANTS_K8S_AVAILABLE_CONTEXTS
pants.toml
[k8s]
available_contexts = [
'<str>',
'<str>',
...,
]
default: []

List of available contexts for kubectl command. k8s_bundle context will be validated against this list.

You have to explicitly provide the list, because it will be shared with people using the pants repo. We can't parse the KUBECONFIG env var because different people might have different private clusters, e.g. minikube or kind, which means pants validation will give different results.

Advanced options

tailor_source_targets

--[no-]k8s-tailor-source-targets
PANTS_K8S_TAILOR_SOURCE_TARGETS
pants.toml
[k8s]
tailor_source_targets = <bool>
default: True

If true, add k8s_sources targets with the tailor goal.

Deprecated options

None

None