Create Kubernetes Pod Network Map

12/25/2019

I am looking to map out various network connections between pods in a namespace to understand which pod is talking to which other pods. Is there a way to query the etcd to get this information?

-- user1708730
kubernetes
networking

2 Answers

12/27/2019

You can try to use Weave Scope to make a graphical map of your Kubernetes cluster.

It will generates a map of your process, containers and hosts in real time. You can also get logs from containers and run some diagnostic commands via WEB-UI.

To install on Kubernetes you can run:

kubectl apply -f "https://cloud.weave.works/k8s/scope.yaml?k8s-version=$(kubectl version | base64 | tr -d '\n')"

After launch you don't need to configure anything, Scope will listen you pods and network and make a map of you network.

-- KoopaKiller
Source: StackOverflow

2/3/2020

There are many tools to visualise k8s topology:

  • spekt8/spekt8: Visualize your Kubernetes cluster in real time :

    • SPEKT8 is a new visualization tool for your Kubernetes clusters. It automatically builds logical topologies of your application and infrastructure, which enable your SRE and Ops team to intuitively understand, monitor, and control your containerized, microservices based application. Simply deploy our containerized application directly into your Kubernetes cluster.
  • Kubernetes Topology Graph:

    • Provides a simple force directed topology graph for kubernetes items.
    • Kubernetes Topology Graph
  • Weave Scope (Github: weaveworks/scope) is a troubleshooting and monitoring tool for Docker and Kubernetes clusters. It can automatically generate applications and infrastructure topologies which can help you to identify application performance bottlenecks easily. You can deploy Weave Scope as a standalone application on your local server/laptop, or you can choose the Weave Scope Software as a Service (SaaS) solution on Weave Cloud. With Weave Scope, you can easily group, filter or search containers using names, labels, and/or resource consumption. :

  • KubeView (Github: benc-uk/kubeview: Kubernetes cluster visualiser and graphical explorer )

    • KubeView displays what is happening inside a Kubernetes cluster, it maps out the API objects and how they are interconnected. Data is fetched real-time from the Kubernetes API. The status of some objects (Pods, ReplicaSets, Deployments) is colour coded red/green to represent their status and health.
  • Cockpit:

    • Cockpit Project — Cockpit Project Cockpit makes GNU/Linux discoverable. See your server in a web browser and perform system tasks with a mouse. It’s easy to start containers, administer storage, configure networks, and inspect logs. Storage screenshot
-- Yasen
Source: StackOverflow