K9s: 0.11.2: Network-Policy tab is empty

Created on 8 Jan 2020  ·  8Comments  ·  Source: derailed/k9s






Describe the bug
Network-Policy tab is empty

To Reproduce

Steps to reproduce the behavior:

> kubectl get networkpolicy -A
NAMESPACE    NAME         POD-SELECTOR      AGE
monitoring   prometheus   name=prometheus
  1. k9s
  2. :np
  3. :q
  4. k9s
  5. The Network-Policy tab is empty.
  6. But it work when one call k9s -c np -A directly.

Expected behavior
The tab should be not empty

Screenshots
image

Versions (please complete the following information):

  • OS: Windows/WSL
  • K9s 0.11.2
  • K8s 1.17.0
norepro

Most helpful comment

@derailed tested with v0.13.7. It works!

All 8 comments

@remoe Thank you for this report. I've ran thru the scenario and can't seem to repro as the np always shows. Could still be a bug depending on the activities you'd perform before? Could you add more details here? Thank you!

here is the log:

10:26AM INF 🐶 K9s starting up...
10:26AM DBG Active Context `demo-kube-context`
10:26AM DBG Connecting to API Server https://demo-kube-master.demo-public.k8s:6443
10:26AM INF ✅ Kubernetes connectivity
10:26AM DBG [Config] Saving configuration...
10:26AM DBG Loading raw config from flags...
10:26AM INF No cluster specific skin file found -- /home/user/.k9s/demo-kube-cluster_skin.yml
10:26AM INF No skin file found -- /home/user/.k9s/skin.yml. Loading stock skins.
10:26AM INF No benchmark config file found, using defaults. error="open /home/user/.k9s/bench-demo-kube-cluster.yml: no such file or directory"
10:26AM INF No namespace specified using all namespaces
10:26AM DBG Factory START with ns `""
10:26AM DBG Loading CRDs...
10:26AM DBG List "":"apiextensions.k8s.io/v1beta1/customresourcedefinitions"
10:26AM DBG AUTH "":"apiextensions.k8s.io/v1beta1/customresourcedefinitions" -- [list watch]
10:26AM DBG   YES!
10:26AM DBG FACTORY_NEW for ns ""
10:26AM DBG FOR_RESOURCE "":"apiextensions.k8s.io/v1beta1/customresourcedefinitions"
10:26AM DBG Sync completed for ns ""
10:26AM DBG >>> CRDS count 14
10:26AM WRN No custom aliases found error="open /home/user/.k9s/alias.yml: no such file or directory"
10:26AM DBG AUTH "":"v1/nodes" -- [list]
10:26AM DBG   YES!
10:26AM DBG AUTH "":"metrics.k8s.io/v1beta1/nodes" -- [list]
10:26AM DBG   YES!
10:26AM WRN NodeMetrics &errors.StatusError{ErrStatus:v1.Status{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ListMeta:v1.ListMeta{SelfLink:"", ResourceVersion:"", Continue:"", RemainingItemCount:(*int64)(nil)}, Status:"Failure", Message:"the server could not find the requested resource (get nodes.metrics.k8s.io)", Reason:"NotFound", Details:(*v1.StatusDetails)(0xc0004be4e0), Code:404}}
10:26AM DBG Setting active ns ""
10:26AM DBG Custom viewer for crd.projectcalico.org/v1/networkpolicies
10:26AM DBG Running Command crd.projectcalico.org/v1/networkpolicies
10:26AM DBG [Config] Saving configuration...
10:26AM DBG AUTH "":"crd.projectcalico.org/v1/networkpolicies" -- [list watch]
10:26AM DBG   YES!
10:26AM DBG FOR_RESOURCE "":"crd.projectcalico.org/v1/networkpolicies"
10:26AM DBG No DAO registry entry for "crd.projectcalico.org/v1/networkpolicies". Using factory!
10:26AM DBG Resource crd.projectcalico.org/v1/networkpolicies not found in registry. Going generic!
10:26AM DBG   LIST elapsed 4.07ms
10:26AM DBG   LIST returned 1 rows
10:26AM DBG TABLE_DATA returns 0 rows
10:26AM DBG RECONCILE elapsed 4.1877ms
10:26AM WRN No plugin configuration found
10:26AM DBG Wait for sync timed out!
10:26AM DBG Resource crd.projectcalico.org/v1/networkpolicies not found in registry. Going generic!
10:26AM DBG   LIST elapsed 4.8024ms
10:26AM DBG   LIST returned 1 rows
10:26AM DBG TABLE_DATA returns 0 rows
10:26AM DBG RECONCILE elapsed 5.8188ms
10:26AM WRN No plugin configuration found

Here is the log with lastest (0.12.0):

10:33AM INF 🐶 K9s starting up...
10:33AM DBG Active Context "demo-kube-context"
10:33AM DBG Connecting to API Server https://demo-kube-master.demo-public.k8s:6443
10:33AM INF ✅ Kubernetes connectivity
10:33AM DBG [Config] Saving configuration...
10:33AM DBG Loading raw config from flags...
10:33AM INF No cluster specific skin file found -- /home/user/.k9s/demo-kube-cluster_skin.yml
10:33AM INF No skin file found -- /home/user/.k9s/skin.yml. Loading stock skins.
10:33AM INF No benchmark config file found, using defaults.
10:33AM INF No namespace specified using all namespaces
10:33AM DBG Factory START with ns `""
10:33AM DBG Loading CRDs...
10:33AM DBG List "":"apiextensions.k8s.io/v1beta1/customresourcedefinitions"
10:33AM DBG AUTH elapsed true--":apiextensions.k8s.io/v1beta1/customresourcedefinitions::list,watch" 7.6647ms
10:33AM DBG FACTORY_CREATE for ns ""
10:33AM DBG FOR_RESOURCE "":"apiextensions.k8s.io/v1beta1/customresourcedefinitions"
10:33AM DBG !!!!!! WAIT FOR CACHE-SYNC ""
10:33AM DBG true -- apiextensions.k8s.io/v1beta1, Resource=customresourcedefinitions
10:33AM DBG Sync completed for ns ""
10:33AM DBG FACTORY-LIST [true] ""::"apiextensions.k8s.io/v1beta1/customresourcedefinitions" elapsed 108.721ms
10:33AM DBG >>> CRDS count 14
10:33AM WRN No custom aliases found error="open /home/user/.k9s/alias.yml: no such file or directory"
10:33AM DBG ASGVR "networkpolicies" "crd.projectcalico.org/v1/networkpolicies" true
10:33AM DBG CMD crd.projectcalico.org/v1/networkpolicies &{0x16d3c30 <nil>} <nil>
10:33AM DBG Setting active ns ""
10:33AM DBG Custom viewer for crd.projectcalico.org/v1/networkpolicies
10:33AM DBG Running Command crd.projectcalico.org/v1/networkpolicies
10:33AM DBG [Config] Saving configuration...
10:33AM DBG AUTH elapsed true--":crd.projectcalico.org/v1/networkpolicies::list,watch" 5.6912ms
10:33AM DBG FOR_RESOURCE "":"crd.projectcalico.org/v1/networkpolicies"
10:33AM DBG No DAO registry entry for "crd.projectcalico.org/v1/networkpolicies". Using factory!
10:33AM DBG Resource crd.projectcalico.org/v1/networkpolicies not found in registry. Going generic!
10:33AM DBG TABLE-LIST "":"crd.projectcalico.org/v1/networkpolicies"
10:33AM DBG   LIST "":"crd.projectcalico.org/v1/networkpolicies" elapsed 5.9907ms
10:33AM DBG   LIST returned 1 rows
10:33AM DBG TABLE_DATA returns 0 rows
10:33AM DBG RECONCILE "":"crd.projectcalico.org/v1/networkpolicies" elapsed 6.1097ms
10:33AM WRN No plugin configuration found
10:33AM DBG Resource crd.projectcalico.org/v1/networkpolicies not found in registry. Going generic!
10:33AM DBG TABLE-LIST "":"crd.projectcalico.org/v1/networkpolicies"
10:33AM DBG   LIST "":"crd.projectcalico.org/v1/networkpolicies" elapsed 8.9147ms
10:33AM DBG   LIST returned 1 rows
10:33AM DBG TABLE_DATA returns 0 rows
10:33AM DBG RECONCILE "":"crd.projectcalico.org/v1/networkpolicies" elapsed 10.1315ms
10:33AM WRN No plugin configuration found
10:33AM DBG Wait for sync timed out!
10:33AM DBG Resource crd.projectcalico.org/v1/networkpolicies not found in registry. Going generic!
10:33AM DBG TABLE-LIST "":"crd.projectcalico.org/v1/networkpolicies"
10:33AM DBG   LIST "":"crd.projectcalico.org/v1/networkpolicies" elapsed 3.8977ms
10:33AM DBG   LIST returned 1 rows
10:33AM DBG TABLE_DATA returns 0 rows
10:33AM DBG RECONCILE "":"crd.projectcalico.org/v1/networkpolicies" elapsed 4.0944ms
10:33AM WRN No plugin configuration found

@remoe Thank you for the update! I still can't repro this ;( Could you give this a rinse with the latest v0.13.7? I have tried calicos np and they seem to always show on my cluster per your repro steps above. It might still be a bug but let's eliminate that potential based on the latest drop and we can go from there... Thank you!

@derailed tested with v0.13.7. It works!

@remoe Excellent!! Thank you so much Remo for reporting back! So happy to hear this.

Thank you for your great project as well! I love it ;)

@remoe Very kind of you to say! Thank you Remo!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

krysopath picture krysopath  ·  3Comments

stk0vrfl0w picture stk0vrfl0w  ·  3Comments

pgoodjohn picture pgoodjohn  ·  4Comments

rahilb picture rahilb  ·  3Comments

dalgibbard picture dalgibbard  ·  3Comments