Skip to content
forked from nuvo/kube-tasks

A tool to perform simple Kubernetes related actions

License

Notifications You must be signed in to change notification settings

maorfr/kube-tasks

 
 

Repository files navigation

Release Travis branch Docker Pulls Go Report Card license

Kube tasks

A tool to perform simple Kubernetes related actions

Commands

Simple Backup

Usage:

Backup files to cloud storage

Usage:
  kube-tasks simple-backup [flags]

Flags:
  -b, --buffer-size float   in-memory buffer size (in MB) to use for files copy (buffer per file) (default 6.75)
  -c, --container string    container name to act on
      --dst string          destination to backup to. Example: s3://bucket/backup
  -n, --namespace string    namespace to find pods
  -p, --parallel int        number of files to copy in parallel. set this flag to 0 for full parallelism (default 1)
      --path string         path to act on
  -l, --selector string     selector to filter on
      --tag string          tag to backup to. Default is Now (yyMMddHHmmss)

Example: Backup Jenkins

kube-tasks simple-backup -n default -l release=jenkins -c jenkins --path /var/jenkins_home --dst s3://maorfr-jenkins-data

Wait for Pods

Usage:

Wait for a given number of ready pods

Usage:
  kube-tasks wait-for-pods [flags]

Flags:
  -n, --namespace string   namespace to find pods
  -r, --replicas int       number of ready replicas to wait for (default 1)
  -l, --selector string    selector to filter on

Example: Cassandra Repairer init container

kube-tasks wait-for-pods -n prod -l release=prod-cassandra --replicas=3

Execute

Usage:

Execute a command in a container. Only executes the command in the first pod

Usage:
  kube-tasks execute [flags]

Flags:
      --command string     command to execute in container
  -c, --container string   container name to act on
  -n, --namespace string   namespace to find pods
  -l, --selector string    selector to filter on

Example: Cassandra Repairer

kube-tasks execute -n prod -l release=prod-cassandra --command "nodetool repair --full"

Packages

No packages published

Languages

  • Go 84.2%
  • Makefile 13.8%
  • Dockerfile 2.0%