kf ssh

Name

kf ssh - Open a shell on an App instance.

Synopsis

kf ssh APP_NAME [flags]

Description

Opens a shell on an App instance using the Pod exec endpoint.

This command mimics CF's SSH command by opening a connection to the Kubernetes control plane which spawns a process in a Pod.

The command connects to an arbitrary Pod that matches the App's runtime labels. If you want a specific Pod, use the pod/ notation.

NOTE: Traffic is encrypted between the CLI and the control plane, and between the control plane and Pod. A malicious Kubernetes control plane could observe the traffic.

Examples

# Open a shell to a specific App
kf ssh myapp

# Open a shell to a specific Pod
kf ssh pod/myapp-revhex-podhex

# Start a different command with args
kf ssh myapp -c /my/command -c arg1 -c arg2

Flags

-c, --command=stringArray

Command to run for the shell. Subsequent definitions will be used as args. (default [/bin/bash])

--container=string

Container to start the command in. (default "user-container")

-T, --disable-pseudo-tty

Don't use a TTY when executing.

-h, --help

help for ssh

Inherited flags

These flags are inherited from parent commands.

--as=string

Username to impersonate for the operation.

--as-group=strings

Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.

--config=string

Path to the Kf config file to use for CLI requests.

--kubeconfig=string

Path to the kubeconfig file to use for CLI requests.

--log-http

Log HTTP requests to standard error.

--space=string

Space to run the command against. This flag overrides the currently targeted Space.