Skip to main content

A CLI tool for Kubernetes Network Policy visualization

Project description

knetvis - Kubernetes Network Policy Visualizer

PyPI version License: MIT Build Status Python 3.8+

A powerful CLI tool for visualizing and testing Kubernetes Network Policies.

Features

  • 🎯 Visual Network Policy Analysis: Generate clear visualizations of your network policies
  • 🔍 Policy Testing: Test connectivity between pods and services
  • Policy Validation: Validate network policies before applying them
  • 🌐 Cross-Namespace Support: Analyze policies across multiple namespaces

Demo

Knetvis Operation

Quick Start

# Install knetvis
pip install knetvis

# Visualize network policies in a namespace
knetvis visualize my-namespace

# Test connectivity between pods
knetvis test pod/frontend pod/backend

# Validate a policy file
knetvis validate policy.yaml

Installation

Prerequisites

  • Python 3.8 or higher
  • Access to a Kubernetes cluster
  • kubectl configured with cluster access

Install Methods

# Via pip
pip install knetvis

# From source
git clone https://github.com/yourusername/knetvis.git
cd knetvis
pip install -e .

Usage Examples

Visualizing Network Policies

# Basic visualization
knetvis visualize production -o network.png

# Show cross-namespace connections
knetvis visualize production --show-external

Testing Connectivity

# Test pod-to-pod connectivity
knetvis test pod/frontend pod/backend

# Test with namespace specification
knetvis test namespace/front/pod/web namespace/back/pod/api

Validating Policies

# Validate a single policy
knetvis validate policy.yaml

# Validate multiple policies
knetvis validate -d policies/

Documentation

Contributing

We welcome contributions! Please see our Contributing Guide for details.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

Acknowledgments

  • The Kubernetes community
  • All contributors and maintainers

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

knetvis-0.1.1.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

knetvis-0.1.1-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file knetvis-0.1.1.tar.gz.

File metadata

  • Download URL: knetvis-0.1.1.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for knetvis-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c1c06f0a58f650ac4e8e5a5950ebc6c8ab45d731819851dc0871210c41a3179d
MD5 6687047867931a2b1089f40f8e8e6835
BLAKE2b-256 7a14bf23cd45f45c044e311525aac890535415ad72d9a2b3b0a944df262d00cd

See more details on using hashes here.

Provenance

The following attestation bundles were made for knetvis-0.1.1.tar.gz:

Publisher: publish.yml on samuelarogbonlo/knetvis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file knetvis-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: knetvis-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for knetvis-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 29c21d5eb9d46d3f88a4d9966943e16997d05a63da51ac9035a1ebd027d38ee1
MD5 ec75ac8814ff8a66e3b9658aed5efdad
BLAKE2b-256 ed835db8d83043bbed12f33d5110e8b23069455d6767184c1607c051ce2ab352

See more details on using hashes here.

Provenance

The following attestation bundles were made for knetvis-0.1.1-py3-none-any.whl:

Publisher: publish.yml on samuelarogbonlo/knetvis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page