Cant connent to pods

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

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”

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

Hi,

Thanks for the assistance.

-n was what I was missing.

Regards
G