Home

Awesome

kubectl-captain

Go Go Report Card

This is kubectl plugin for captain, currently it support the following commands:

Install

Download the latest build from the releases page, decompress it and run

mv kubectl-captain-<arch> /usr/local/bin/kubectl-captain
chmod +x /usr/local/bin/kubectl-captain

Example

  1. kubectl captain upgrade

kubectl captain upgrade jenkins -n default --set global.images.jenkins.tag=1.6.0 -v 1.6.0

This command upgrade a HelmRequest named jenkins in default namespace, set the chart version to 1.6.0, and set it's image tag to 1.6.0

  1. kubectl captain rollback

kubectl captain rollback jenkins -n default

This command rollback a HelmRequest to it's previous settings.

  1. kubectl captain import

kubectl captain import wordpress -n default --repo=stable --repo-namespace=captain

This command import an existing helm v2 release named wordpress, who's chart is belongs to a repo named stable. this command will try to create a ChartRepo resource for this repo first in the captain namespace if it not exist, afterwards it will create a HelmRequest resource named wordpress in the default namespace. Captain will do the sync stuff.

  1. kubectl captain create-repo

kubectl captain create-repo test-repo --url=https://alauda.github.io/captain-test-charts/ -n captain -w --timeout=30

This command create a ChartRepo named test-repo in the captain namespace.

  1. kubectl captain create

kubectl captain create test-nginx --chart=stable/nginx-ingress --version=1.26.2 --set=a=b -w --timeout=30

This command create a HelmRequest named test-nginx, using chart stable/nginx-ingress, and version 1.26.2, and some values.