Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
maorfr committed Dec 18, 2018
1 parent b2affa0 commit d0a3b35
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 1 deletion.
47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,65 @@ A tool to perform simple Kubernetes related actions

### 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://nuvo-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"
Expand Down
2 changes: 1 addition & 1 deletion cmd/kube-tasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func NewSimpleBackupCmd(out io.Writer) *cobra.Command {
f.StringVar(&b.dst, "dst", "", "destination to backup to. Example: s3://bucket/backup")
f.IntVarP(&b.parallel, "parallel", "p", 1, "number of files to copy in parallel. set this flag to 0 for full parallelism")
f.StringVar(&b.tag, "tag", utils.GetTimeStamp(), "tag to backup to. Default is Now (yyMMddHHmmss)")
f.Float64VarP(&b.bufferSize, "buffer-size", "b", 6.75, "in-memory buffer size (in MB) to use for files copy (buffer per file_")
f.Float64VarP(&b.bufferSize, "buffer-size", "b", 6.75, "in-memory buffer size (in MB) to use for files copy (buffer per file)")

return cmd
}
Expand Down

0 comments on commit d0a3b35

Please sign in to comment.