net3

module
v0.0.0-...-7f84440 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2022 License: Apache-2.0

README

net³

Lint and Test Go Report Card

net³ [netkube] is a tool to debug and understand network traffic in Kubernetes.

Usage

Topo

Show the network topology of a specific connection

$ net3 topo -n source mypod123 myservice123

┌─────────────────────────────────────────────────────┐
│ Pod                                                 │
│ Name: mypod123                                      │
│ Namespace: my-ns                                    │
│ Status: Running                                     │
│ Ports: TCP:8080 (http), TCP:15090 (http-envoy-prom) │
└─────────────────────────────────────────────────────┘
      │
      │
      │ TCP:80
      │
      V
┌────────────────────────┐
│ Service                │
│ Name: myservice123     │
│ Namespace: other-ns    │
│ Ports: TCP:80 (http)   │
│ Target Ports: TCP:http │
└────────────────────────┘
      │
      │
      │ http
      │
      V
┌─────────────────────────────────────────────────┐
│ Ingress Network Policy                          │
│ Name: allow-ingress                             │
│ Namespace: other-ns                             │
│ Rule: Allow all traffic from all pods           │
└─────────────────────────────────────────────────┘
      │
      │
      │ http
      │
      V
┌─────────────────────────────────────────────────────┐
│ Pod                                                 │
│ Name: myotherpod123                                 │
│ Namespace: other-ns                                 │
│ Status: Running                                     │
│ Ports: TCP:8080 (http), TCP:15090 (http-envoy-prom) │
└─────────────────────────────────────────────────────┘

Proxy

Add a logging proxy to an existing service. Currently, only the HTTP protocol is supported.

To add a proxy, run

$ net3 proxy add -n mynamespace123 myservice123 80

and in another shell run

$ kubectl logs -n mynamespace123 mypod123 -c net3-proxy -f

When you're done, remove the logging proxy from a service by running

$ net3 proxy remove -n mynamespace123 myservice123 80

Directories

Path Synopsis
cmd
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL