A kubectl
plugin that fetches a given CiliumNetworkPolicy
resource from the cluster, uploads it to editor.networkpolicy.io
to generate a diagram, and saves the diagram locally.
Note: Instead of installing all browsers, you can specify the browser (e.g. install chrome --with-deps)
go run github.com/playwright-community/playwright-go/cmd/[email protected] install --with-deps
# Or
go install github.com/playwright-community/playwright-go/cmd/[email protected]
playwright install --with-deps
kubectl krew install cnp-viz
-
Download the latest release from GitHub Releases.
-
Move the binary to a directory in your
$PATH
, for example:
mv kubectl-cnp-viz /usr/local/bin/ubectl-cnp_viz
chmod +x /usr/local/bin/kubectl-cnp_viz
kubectl cnp-viz -n my-namespace service-np
kubectl cnp-viz -n my-namespace service-np --scale 2
kubectl cnp-viz -n my-namespace service-np --x 600
kubectl cnp-viz -n my-namespace service-np --y 50
kubectl cnp-viz -n my-namespace service-np --output ~/diagrams
This plugin is open-source and available under the Apache 2.0 License.