# Kubectl can list all the pods but cannot get logs or connect to them

**URL:** <https://discuss.kubernetes.io/t/kubectl-can-list-all-the-pods-but-cannot-get-logs-or-connect-to-them/21992>\
**Category:** General Discussions\
**Created:** [November 18, 2022, 3:49pm UTC](https://discuss.kubernetes.io/t/kubectl-can-list-all-the-pods-but-cannot-get-logs-or-connect-to-them/21992 "2022-11-18T15:49:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhay\_prajapati](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/abhay_prajapati/32/11204_2.png) [@abhay\_prajapati](https://discuss.kubernetes.io/u/abhay_prajapati)\
**Post date:** [November 18, 2022, 3:49pm UTC](https://discuss.kubernetes.io/t/kubectl-can-list-all-the-pods-but-cannot-get-logs-or-connect-to-them/21992/1 "2022-11-18T15:49:42Z")

</div>

Asking for help? Comment out what you need so we can get more information to help you!

### Cluster information:

Kubernetes version: 1.25.3  
Cloud being used: bare-metal  
Installation method: kind and kubectl  
Host OS: Ubuntu

I can list all the pods using kubectl command.

```auto
kubectl get pods
NAME READY STATUS RESTARTS AGE
details-68798648c5-dhflm 1/1 Running 0 66m
frontend-7f68d468fb-l62d9 1/1 Running 0 66m
pinger-v1-759477f7c6-glgfd 1/1 Running 0 66m
pinger-v2-86c588f594-g5pdw 1/1 Running 0 66m

```

however when i try to port forward using kubectl or even log these pods, i get that the i/o timeout error.

```auto
kubectl logs details-68798648c5-dhflm
Error from server: Get "https://172.18.0.2:10250/containerLogs/default/details-68798648c5-dhflm/details": dial tcp 172.18.0.2:10250: i/o timeout

```

I can’t figure out where the problem is and how to resolve it.

---

<div class="post-metadata">

**Author:** ![jankin](https://avatars.discourse-cdn.com/v4/letter/j/e5b9ba/32.png) [@jankin](https://discuss.kubernetes.io/u/jankin)\
**Post date:** [May 22, 2023, 7:42am UTC](https://discuss.kubernetes.io/t/kubectl-can-list-all-the-pods-but-cannot-get-logs-or-connect-to-them/21992/2 "2023-05-22T07:42:00Z")

</div>

I have the same problem,is there any solution?
