# Cant connent to pods

**URL:** <https://forum.ansible.com/t/cant-connent-to-pods/37121>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [September 19, 2022, 2:25am UTC](https://forum.ansible.com/t/cant-connent-to-pods/37121 "2022-09-19T02:25:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gregory\_Machin](https://avatars.discourse-cdn.com/v4/letter/g/e5b9ba/32.png) [@Gregory\_Machin](https://forum.ansible.com/u/Gregory_Machin)\
**Post date:** [September 19, 2022, 2:25am UTC](https://forum.ansible.com/t/cant-connent-to-pods/37121/1 "2022-09-19T02:25:52Z")

</div>

Hi,

I was trying to debug an issue with an upgrade from 21.4.0 to 21.9.0 , but I’m not able to connect to the pods to run commands.  
I get errors like :  
Error from server (NotFound): pods “awx-788749fb7f-gvtv9” not found

root@host:~/awx-operator# kubectl -n awx get all  
NAME READY STATUS RESTARTS AGE  
pod/awx-operator-controller-manager-7f89bd5797-zp27t 2/2 Running 13 (66m ago) 37d  
pod/awx-postgres-13-0 1/1 Running 0 45m  
pod/awx-788749fb7f-gvtv9 4/4 Running 0 45m

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE  
service/awx-operator-controller-manager-metrics-service ClusterIP 10.43.88.44 8443/TCP 37d  
service/awx-postgres-13 ClusterIP None 5432/TCP 37d  
service/awx-service ClusterIP 10.43.137.182 80/TCP 37d

NAME READY UP-TO-DATE AVAILABLE AGE  
deployment.apps/awx-operator-controller-manager 1/1 1 1 37d  
deployment.apps/awx 1/1 1 1 37d

NAME DESIRED CURRENT READY AGE  
replicaset.apps/awx-operator-controller-manager-7f89bd5797 1 1 1 37d  
replicaset.apps/awx-5d7b85bc77 0 0 0 37d  
replicaset.apps/awx-788749fb7f 1 1 1 34d

NAME READY AGE  
statefulset.apps/awx-postgres-13 1/1 37d  
root@host:~/awx-operator# kubectl exec -ti awx-operator-controller-manager-7f89bd5797-zp27t – bash  
Error from server (NotFound): pods “awx-operator-controller-manager-7f89bd5797-zp27t” not found  
root@host:~/awx-operator# kubectl exec -ti awx-operator-controller-manager-7f89bd5797 – bash  
Error from server (NotFound): pods “awx-operator-controller-manager-7f89bd5797” not found  
root@host:~/awx-operator# kubectl exec -ti awx-788749fb7f-gvtv9 – bash  
Error from server (NotFound): pods “awx-788749fb7f-gvtv9” not found  
root@host:~/awx-operator# kubectl exec -ti awx-postgres-13-0 – bash  
Error from server (NotFound): pods “awx-postgres-13-0” not found  
root@host:~/awx-operator# kubectl exec -ti awx-postgres-13-0 – /bin/sh  
Error from server (NotFound): pods “awx-postgres-13-0” not found  
root@host:~/awx-operator# kubectl exec -ti awx-postgres-13-0 – /bin/sh

what I’m I doing wrong ?

Currently AWX is running just still 21.4.0.  
Thanks  
Greg

---

<div class="post-metadata">

**Author:** ![kurokobo1](https://avatars.discourse-cdn.com/v4/letter/k/f0a364/32.png) [@kurokobo1](https://forum.ansible.com/u/kurokobo1)\
**Post date:** [September 19, 2022, 7:38am UTC](https://forum.ansible.com/t/cant-connent-to-pods/37121/2 "2022-09-19T07:38:14Z")

</div>

Hi,

Your pods seem to be in “awx” namespace,  
therefore specifing “-n awx” for your “kubectl exec” command is required;  
e.g. “kubectl -n awx exec -ti awx-operator-controller-manager-7f89bd5797-zp27t – bash”

---

<div class="post-metadata">

**Author:** ![m.nelson](https://avatars.discourse-cdn.com/v4/letter/m/c37758/32.png) [@m.nelson](https://forum.ansible.com/u/m.nelson)\
**Post date:** [September 19, 2022, 8:52am UTC](https://forum.ansible.com/t/cant-connent-to-pods/37121/3 "2022-09-19T08:52:59Z")

</div>

Hi,  
You need to provide the container name after the pod i.e:

kubectl exec -ti -n yournamespace deploy/awx -c awx-task -- /bin/bash  
kubectl exec -ti -n yournamespace deploy/awx -c awx-web -- /bin/bash  
kubectl exec -ti -n yournamespace deploy/awx -c awx-ee -- /bin/bash  
kubectl exec -ti -n yournamespace deploy/awx -c redis -- /bin/bash

Regards,  
Antuelle78

---

<div class="post-metadata">

**Author:** ![Gregory\_Machin](https://avatars.discourse-cdn.com/v4/letter/g/e5b9ba/32.png) [@Gregory\_Machin](https://forum.ansible.com/u/Gregory_Machin)\
**Post date:** [September 21, 2022, 8:55pm UTC](https://forum.ansible.com/t/cant-connent-to-pods/37121/4 "2022-09-21T20:55:15Z")

</div>

Hi,

Thanks for the assistance.

-n was what I was missing.

Regards  
G
