kf ssh

Stay organized with collections Save and categorize content based on your preferences.


kf ssh - Open a shell on an App instance.


kf ssh APP_NAME [flags]


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.


# 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


-c, --command=stringArray

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


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.


Username to impersonate for the operation.


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


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


Path to the kubeconfig file to use for CLI requests.


Log HTTP requests to standard error.


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