Since I am a newbie in Kubernetes and trying to work with it I am getting an error of No agent available while executing
kubectl exec -it <POD NAME> -c <CONTAINER NAME> -- /bin/bash
# Or
kubectl logs po/<POD NAME>
Full error
error: Internal error occurred: error sending request: Post "https://172.24.2.61:10250/exec/default/backend-595fbf9667-h2bzx/backend-sha256-1?command=%!F(MISSING)bin%!F(MISSING)bash&input=1&output=1&tty=1": No agent available
or
Error from server: Get "https://172.24.2.61:10250/containerLogs/utshab/frontend-5969767748-prlkn/frontend": No agent available
Cluster information:
Kubernetes version:
Client Version: v1.31.0
Kustomize Version: v5.4.2
Server Version: v1.30.5-gke.1699000
Cloud being used: GCP
Installation method: Managed cluster
Host OS: Container-Optimized OS from Google
CNI and version: Calico v3.26.3-gke.17
CRI and version: containerd 1.7.23
Any one if can guide me why am I getting this error and what could be the solution to it, would be much appreciated.
Few other info for reference
- This is happening for all pods
- Getting the same error for all other bash commands such as (date, pwd)