Sha256: c2f63099806acfc589260cff9167265a70c7458d1a43f6929d22499dd43cfff5

Contents?: true

Size: 1.15 KB

Versions: 37

Compression:

Stored size: 1.15 KB

Contents

The exec command finds the latest pod from the deployment and runs `kubectl exec -ti POD bash` to get you into it. It spares you from having to manually find and type it.

## Examples

    kubes exec
    kubes exec sh
    kubes exec ls -l

## Multiple Deployments

If you have have multiple deployments in your `.kubes/resources` then the command will use the first deployment by default. You can specify the specfic deployment with the `--name` or `-n` option.  Examples:

    kubes exec --name web
    kubes exec -n web
    kubes exec -n clock
    kubes exec -n worker
    kubes exec -n web sh
    kubes exec -n web ls -l

## Multiple Pod Containers

If you have have multiple containers in your pod. You can specify the specfic container with the `--container` or `-c` option.  Examples:

    kubes exec --name web

## Default Exec Command

The default exec command is `sh`.  Example:

    $ kubes exec
    => kubectl exec -n demo-dev -ti web-568645f665-62j8f -- sh
    /app #

You can override the default with `KUBES_DEFAULT_EXEC`.  Example:

    $ export KUBES_DEFAULT_EXEC=bash
    $ kubes exec
    => kubectl exec -n demo-dev -ti web-568645f665-62j8f -- bash
    /app #

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
kubes-0.9.3 lib/kubes/cli/help/exec.md
kubes-0.9.2 lib/kubes/cli/help/exec.md
kubes-0.9.1 lib/kubes/cli/help/exec.md
kubes-0.9.0 lib/kubes/cli/help/exec.md
kubes-0.8.10 lib/kubes/cli/help/exec.md
kubes-0.8.9 lib/kubes/cli/help/exec.md
kubes-0.8.8 lib/kubes/cli/help/exec.md
kubes-0.8.7 lib/kubes/cli/help/exec.md
kubes-0.8.6 lib/kubes/cli/help/exec.md
kubes-0.8.5 lib/kubes/cli/help/exec.md
kubes-0.8.4 lib/kubes/cli/help/exec.md
kubes-0.8.3 lib/kubes/cli/help/exec.md
kubes-0.8.2 lib/kubes/cli/help/exec.md
kubes-0.8.1 lib/kubes/cli/help/exec.md
kubes-0.8.0 lib/kubes/cli/help/exec.md
kubes-0.7.10 lib/kubes/cli/help/exec.md
kubes-0.7.9 lib/kubes/cli/help/exec.md
kubes-0.7.8 lib/kubes/cli/help/exec.md
kubes-0.7.7 lib/kubes/cli/help/exec.md
kubes-0.7.6 lib/kubes/cli/help/exec.md