53 lines
1.3 KiB
Markdown
53 lines
1.3 KiB
Markdown
---
|
|
title: vela exec
|
|
---
|
|
|
|
Execute command in a container
|
|
|
|
### Synopsis
|
|
|
|
Execute command inside container based vela application.
|
|
|
|
```
|
|
vela exec [flags] APP_NAME -- COMMAND [args...]
|
|
```
|
|
|
|
### Examples
|
|
|
|
```
|
|
|
|
# Get output from running 'date' command from app pod, using the first container by default
|
|
vela exec my-app -- date
|
|
|
|
# Switch to raw terminal mode, sends stdin to 'bash' in containers of application my-app
|
|
# and sends stdout/stderr from 'bash' back to the client
|
|
vela exec my-app -i -t -- bash -il
|
|
|
|
```
|
|
|
|
### Options
|
|
|
|
```
|
|
-e, --env string specify environment name for application
|
|
-h, --help help for exec
|
|
-n, --namespace string specify the Kubernetes namespace to use
|
|
--pod-running-timeout duration The length of time (like 5s, 2m, or 3h, higher than zero) to wait until at least one pod is running (default 1m0s)
|
|
-i, --stdin Pass stdin to the container (default true)
|
|
-t, --tty Stdin is a TTY (default true)
|
|
```
|
|
|
|
### Options inherited from parent commands
|
|
|
|
```
|
|
-y, --yes Assume yes for all user prompts
|
|
```
|
|
|
|
### SEE ALSO
|
|
|
|
|
|
|
|
#### Go Back to [CLI Commands](vela) Homepage.
|
|
|
|
|
|
###### Auto generated by [spf13/cobra script in KubeVela](https://github.com/kubevela/kubevela/tree/master/hack/docgen).
|