Engine Yard Kontainers (EYK) users can connect to a running container instance from the CLI for purposes of executing supported commands.
Follow these steps to connect to a running pod:
- Use the EYK
ssologincommand to log in and ensure you are connected to the correct cluster. See Steps 3 and 4 in the Getting Started with Engine Yard Kontainers step-by-step guide for additional information on this step.
Note: If you need to move your application to a new cluster, follow the steps outlined in Moving an application to a new cluster before proceeding.
- Obtain the pod name by running the following command:
eyk ps -a appnameThe output will display the pod name in the format <appname>-<type>-<pod>
qzapp-web-866587cc47-kfj4jas shown in the below example for the EYK sample ruby-quiz app:
- Obtain a console session to a running container within a pod using the command:
eyk ps:console <podname> <type> <appname> <command> [options]Example:
eyk ps:console qzapp-web-866587cc47-kfj4j web qzapp /bin/bashOutput:
root@qzapp-web-866587cc47-kfj4j:/app#CLI prompt confirms successful initiation of a console session to a running container and ready to execute commands.
- You may exit the session by typing exit and hitting enter twice.
eyk psconsole session is not meant to be a full-featured CLI console similar to what you get when using SSH. See Problems running console commands when connected through 'eyk ps:console' for more information on known limitations.