kubectl

by kubelauncher

Helm chartv0.3.2App 1.37.1Apache-2.0Verified publisher

Kubectl CLI utility container for Kubernetes jobs and CronJobs

About this chart

kubectl

Kubectl CLI utility container for Kubernetes jobs and CronJobs

TL;DR

helm repo add kubelauncher https://kubelauncher.github.io/charts
helm install my-job kubelauncher/kubectl \
  --set command='{kubectl}' \
  --set args='{get,pods,-A}'

Or via OCI:

helm install my-job oci://ghcr.io/kubelauncher/charts/kubectl \
  --set command='{kubectl}' \
  --set args='{get,pods,-A}'

Introduction

This chart deploys a kubectl utility container as a Job or CronJob on Kubernetes using the kubelauncher/kubectl Docker image. Includes RBAC support, yq, jq, and git.

Set schedule to create a CronJob instead of a one-shot Job.

Installing the Chart

helm repo add kubelauncher https://kubelauncher.github.io/charts

# One-shot job
helm install my-job kubelauncher/kubectl \
  --set command='{kubectl}' \
  --set args='{get,namespaces}'

# CronJob
helm install my-cron kubelauncher/kubectl \
  --set schedule="0 */6 * * *" \
  --set command='{kubectl}' \
  --set args='{get,pods,-A}'

Or via OCI:

helm install my-job oci://ghcr.io/kubelauncher/charts/kubectl \
  --set command='{kubectl}' \
  --set args='{get,namespaces}'

Uninstalling the Chart

helm uninstall my-job

Values

KeyTypeDefaultDescription
affinityobject{}
argslist[]
backoffLimitint3
commandlist[]
commonAnnotationsobject{}
commonLabelsobject{}
containerSecurityContext.allowPrivilegeEscalationboolfalse
containerSecurityContext.capabilities.drop[0]string"ALL"
containerSecurityContext.enabledbooltrue
containerSecurityContext.readOnlyRootFilesystemboolfalse
containerSecurityContext.runAsGroupint1001
containerSecurityContext.runAsNonRootbooltrue
containerSecurityContext.runAsUserint1001
containerSecurityContext.seccompProfile.typestring"RuntimeDefault"
enableServiceLinksboolfalse
extraEnvVarslist[]
extraVolumeMountslist[]
extraVolumeslist[]
fullnameOverridestring""
global.imagePullSecretslist[]
global.imageRegistrystring""
image.digeststring"sha256:2a5b40c827ab9e05ae66ee174660f9ce34e12e9e8799d0ad06b7564554fac175"
image.pullPolicystring"Always"
image.pullSecretslist[]
image.registrystring"ghcr.io"
image.repositorystring"kubelauncher/kubectl"
image.tagstring"1.37.1"
nameOverridestring""
namespaceOverridestring""
networkPolicy.additionalRuleslist[]
networkPolicy.allowExternalbooltrue
networkPolicy.enabledboolfalse
nodeSelectorobject{}
podAnnotationsobject{}
podLabelsobject{}
podSecurityContext.enabledbooltrue
podSecurityContext.fsGroupint1001
rbac.clusterWideboolfalse
rbac.createbooltrue
rbac.ruleslist[]
resourcesobject{}
resourcesPresetstring"nano"
restartPolicystring"OnFailure"
schedulestring""
serviceAccount.annotationsobject{}
serviceAccount.automountServiceAccountTokenbooltrue
serviceAccount.createbooltrue
serviceAccount.namestring""
tolerationslist[]
ttlSecondsAfterFinishedint300

Maintainers

NameEmailUrl
kubelauncher[email protected]https://www.kubelauncher.com

Deploy kubectl with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has kubectl on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartkubectl is pinned at v0.3.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply