Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error viewing containers in pods on first load #2997

Open
samcook opened this issue Nov 27, 2024 · 2 comments
Open

Error viewing containers in pods on first load #2997

samcook opened this issue Nov 27, 2024 · 2 comments
Labels
bug Something isn't working question Further information is requested

Comments

@samcook
Copy link

samcook commented Nov 27, 2024




Describe the bug
In the pods all view (not filtered to a specific namespace), when hitting enter on a pod to view its containers the list of containers fails to load (a blank view is displayed) and there is an error displayed at the bottom of the screen Watcher failed for containers -- pods "pod-name" not found.

Returning to the pods view and then pressing enter to go back to the containers view subsequently works as expected for any pods in the same namespace as the one that failed the first time.

Pods in other namespaces also show similar "Watcher failed" errors the first time before working on subsequent attempts.

The problem doesn't appear to happen when the pods view is set to show a specific namespace.

To Reproduce
Steps to reproduce the behavior:

  1. Go to pods all view (not filtered by namespace)
  2. Press enter on a pod
    • Expect to see a list of containers in the pod, but instead get a blank container list view and Watcher failed for containers -- pods "pod-name" not found error
  3. Press escape to return to pod list
  4. Press enter on the same pod (or any other pod in the same namespace)
    • Container view now loads correctly
  5. Press escape to return to pod list
  6. Repeat steps 2-5 selecting pods in a different namespace

Historical Documents
k9s -l debug log while starting k9s, going to pods all and then trying to view containers in pods in two different namespaces

11:42AM INF 🐶 K9s starting up...
11:42AM ERR Fail to locate metrics-server error="No metrics api group metrics.k8s.io found on cluster"
11:42AM DBG Active Context "arn:aws:eks:eu-central-1:111111111111:cluster/xyz"
11:42AM INF ✅ Kubernetes connectivity
11:42AM DBG No custom skin found. Using stock skin
11:42AM DBG Factory START with ns `"all"
11:42AM DBG Fetching latest k9s rev...
11:42AM DBG K9s latest rev: "v0.32.7"
11:42AM DBG No custom skin found. Using stock skin
11:42AM ERR Watcher failed for containers -- pods "arc-systems-gha-rs-controller-7c6ddb84c4-5rcwp" not found error="pods \"arc-systems-gha-rs-controller-7c6ddb84c4-5rcwp\" not found"
11:42AM ERR Watcher failed for containers -- pods "ingress-nginx-controller-6fcf745c45-55vt6" not found error="pods \"ingress-nginx-controller-6fcf745c45-55vt6\" not found"

Expected behavior
Pressing enter on a pod in the pods all view should show the containers in the pod the first time.

Versions (please complete the following information):

  • OS: Windows
  • K9s: 0.32.7
  • K8s: various, AWS EKS 1.28.14 & 1.30.6, Azure AKS 1.28.14

Additional context
Maybe the same issue as #1069?

@derailed
Copy link
Owner

@samcook Thanks for the report! How many pods are present when viewing all namespaces?

@derailed derailed added bug Something isn't working question Further information is requested labels Nov 29, 2024
@samcook
Copy link
Author

samcook commented Dec 2, 2024

Hi @derailed, I've got a few different clusters which exhibit the issue.

In Amazon EKS, they have 100 pods, 176 pods, 88 pods, ...
In Azure AKS I have one with 57 pods.
I also have a small microk8s cluster with only 14 pods which also exhibits the problem.

What doesn't show the issue is a kind cluster running on my local machine - even with over 100 pods it works as expected.

So perhaps there could be something latency/timeout related? All the clusters which have issues for me are located in the US or Europe, and I'm in New Zealand, so there's at least 150ms of round trip latency 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants