Skip to content

Commit

Permalink
add readme for rancher-exec
Browse files Browse the repository at this point in the history
  • Loading branch information
pehbehbeh committed Apr 24, 2019
1 parent 2d43777 commit 3bc7b37
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ This docker image enables simple deployments to Rancher.
It is a small alpine image with [Rancher CLI](https://rancher.com/docs/rancher/v2.x/en/cli/) `rancher`
and [Kubernetes CLI](https://kubernetes.io/docs/tasks/tools/install-kubectl/) `kubectl` installed.

It also comes with a custom `rancher-redeploy` command (see usage section).
It also comes with a custom `rancher-redeploy` and `rancher-exec` command helper (see usage section).

## Usage

### Simple Redeploy via GitLab CI
### Simple Redeploy via GitLab CI and `rancher-redeploy` helper

To use this image via GitLab CI add the following to the `.gitlab-ci.yml`:

Expand All @@ -36,6 +36,12 @@ Don't forget to provide `$RANCHER_TOKEN` via GitLab CI/CD variable.
This will trigger a redeploy of the given Kubernetes deployment by updating a label
and pull the newest image if configured correctly.

### Execute Command via `rancher-exec` helper

You can also execute commands in pods of your deployment via `rancher-exec $K8S_NAMESPACE $K8S_DEPLOYMENT 'ls'`.
This will execute the given command in the first pod of your deployment.
Currently this is only tested with single container pods.

## Changelog

Check [releases](https://github.com/sourceboat/rancher-deploy/releases) for all notable changes.
Expand Down

0 comments on commit 3bc7b37

Please sign in to comment.