[Yandex Cloud documentation](../../../index.md) > [Yandex Managed Service for Kubernetes](../../index.md) > [Step-by-step guides](../index.md) > Working with Kubernetes objects from the management console > Connecting to the terminal of a running container

# Connecting to the terminal of a running container

You can use the Managed Service for Kubernetes management console to connect to a container running in a pod and run commands without restarting or stopping the container. This approach is equivalent to `kubectl exec -it <pod_name> -- <shell_name>` and enables you to inspect logs during debugging, restart services, and modify configurations.

To connect to the terminal:

{% list tabs group=instructions %}

- Management console {#console}

  1. In the [management console](https://console.yandex.cloud), navigate to the folder dashboard and select **Managed Service for&nbsp;Kubernetes**.
  1. Click the cluster name and select ![PersonWorker](../../../_assets/console-icons/person-worker.svg) **Workload** in the left-hand panel.
  1. Click the pod name.
  1. In the top-right corner, click ![Terminal](../../../_assets/console-icons/terminal.svg) **Terminal**.

      The terminal will open at the bottom of the screen.
  1. Note that for multi-container pods, the terminal will open for the first container specified under `spec.containers` in the pod manifest.
  
      To switch to a shell of another container, select it from the drop-down menu in the top-left corner of the terminal window.

  The container’s default command shell will open.

  {% note warning %}

  The following error occurs when attempting to access the terminal of containers deployed from [minimal or distroless images](https://docs.docker.com/dhi/core-concepts/distroless/) that do not have a shell:
  
  `Connection failed. Terminal shell is not found`
    
  In such cases, we recommend you use [ephemeral containers](https://kubernetes.io/docs/concepts/workloads/pods/ephemeral-containers/) for connecting.

  {% endnote %}

{% endlist %}

#### See also {#see-also}

[Pod](../../concepts/index.md#pod)