benc-uk / kubeview

Kubernetes cluster visualiser and graphical explorer

Home Page:http://kubeview.benco.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question about Network Policies

dmlabs opened this issue · comments

Hi Ben,

I like your idea and your project.
Do you have any plans to visualize also Kubernetes Network Policies from the networking.k8s.io/v1 API?
I mean this kind of Kubernetes ressources:

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy

I started something for Network Policies myself, but I am a System Engineer and not a Developer, that is why my project contains only bash scripts at the moment. :-)
https://github.com/dmlabs/kube-defcon

Kind Regards,
Domenic

NetworkPolicy is one area of Kubernetes I've not investigated yet, but I really should take a look!

From an initial investigation it should be too hard to add, but the thing I'm struggling to see is the linkage between the policy object and the pods it is applied to. I've applied a policy to a pod in my cluster and nothing in the API gives me a clue to how they are now related. The only thing is the label-selector

What would you like to see, in the visual map view? Other than linkage between a policy object and pods?

kubectl describe netpol <netpol> gives an overview, how Kubernetes interprets the network policy.

In my project my idea is to get all network policies and pods as json and store them in a MongoDB. Then implement some logic that is able to connect the network policies machLabels with the Pod labels and create some kind of graphic.

I tough about view for each namespaces where arrows indicate which pods can communicate with each other or with other resources outside the cluster.