1. Resources
  2. /
  3. Plugins
  4. /
  5. kustomize-job-buildkite-plugin

Kubernetes Job Buildkite Plugin

Allows your buildkite pipeline step to submit a kubernetes job. Your buildkite repo will be checked out and made available to your job via an init container. The agent will poll the job for completion, log the output and then delete the job.

Needs kustomize >= v1.0.7 and kubectl installed on your buildkite agent. It also expects a secret called kite-me with a key called agent-ssh which contains a private ssh key which is used to access git repositories. This secret must be in the same namespace that your kubernetes job step will run.

How?

  • In your repo, create a kustomization overlay…
cat <<EOF > overlay/environment/kustomization.yaml
commonLabels:
  environment: test
bases:
- /kustomize/base
patches:
- batch.yaml
EOF

cat <<EOF > overlay/environment/batch.yaml
apiVersion: batch/v1
kind: Job
metadata:
  name: k8s-kustom-job
spec:
  template:
    metadata:
      annotations:
        iam.amazonaws.com/role: arn:aws:iam::123456789012:role/letmein
    spec:
      containers:
      - name: step
        image: bash
        command: [ "find", "." ]
EOF
  • update your buildkite pipeline step to use the plugin
---
steps:

- label: ":kubernetes: job step"
  branches: master
  plugins:
    - MYOB-Technology/kustomize-job:
        name: k8s-kustom-job
        overlay: overlays/environment
  agents:
    queue: bk-queue-name
  • the plugin name parameter must match the name of the job in your overlay
  • the plugin overlay parameter must match the overlay directory in your repo

Plugin Parameters

  • name
    • Required. The name of the k8s job which must the name defined in your overlay.
  • overlay
    • Required. The directory name of your kustomize overlay with your repo.
  • debug
    • Turns on bash debug output.
  • secret-name
    • set the secret name that the job init container needs to check out the git repo
  • secret-key
    • set the secret key that contains ssh private key for git repo access
  • timeout
    • set the timeout for the job step. No timeout if not set.
  • init-image
    • override the job initContainer image with your own custom. A buildkite-agent binary is expected to exist to do the checkout.
  • init-image-tag
    • override the job initContainer image version with your own version. Set this if you set init-image.
  • image
    • override the job container image with your own custom value. Normally this is done within the kustomize overlay, but you may need to pass in dynamic info from buildkite pipeline.
  • image-tag
    • override the job container image tag with your own custom value. Normally this is done within the kustomize overlay, but you may need to pass in dynamic info from buildkite pipeline.

The plugins listed on this webpage are provided for informational purposes only. They have not undergone any formal security review or assessment. While we strive to provide useful resources, we cannot guarantee the safety, reliability, or integrity of these plugins. Users are strongly advised to conduct their own security evaluations before downloading, installing, or using any plugin. By using these plugins, you acknowledge and accept any risks associated with their use. We disclaim any liability for any harm or damages arising from the use of the plugins listed.

Start turning complexity into an advantage

Create an account to get started with a 30-day free trial. No credit card required.

Buildkite Pipelines

Platform

  1. Pipelines
  2. Pipeline templates
  3. Public pipelines
  4. Test Engine
  5. Package Registries
  6. Mobile Delivery Cloud
  7. Pricing

Hosting options

  1. Self-hosted agents
  2. Mac hosted agents
  3. Linux hosted agents

Resources

  1. Docs
  2. Blog
  3. Changelog
  4. Webinars
  5. Plugins
  6. Case studies
  7. Events
  8. Migration Services
  9. Comparisons

Company

  1. About
  2. Careers
  3. Press
  4. Brand assets
  5. Contact

Solutions

  1. Replace Jenkins
  2. Workflows for AI/ML
  3. Testing at scale
  4. Monorepo mojo
  5. Bazel orchestration

Legal

  1. Terms of Service
  2. Acceptable Use Policy
  3. Privacy Policy
  4. Subprocessors
  5. Service Level Agreement

Support

  1. System status
  2. Forum
© Buildkite Pty Ltd 2025