Skip to content

Instantly share code, notes, and snippets.

@lalyos
Last active November 18, 2020 20:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lalyos/22e28d6f7e71228bf4106f6e9cfc4025 to your computer and use it in GitHub Desktop.
Save lalyos/22e28d6f7e71228bf4106f6e9cfc4025 to your computer and use it in GitHub Desktop.
k8s kubegraph generate svg from manifest via graphviz

Generate svg diagrams from k8s manifest files

Tools needed

Usage

generate dot file from manifest

kubegraph flux.yaml #creates flux.dot

or from a helm chart

helm template vault banzai/vault-operator > x.yaml
kubegraph x.yaml 

convert dot to svg

docker run --rm -v $PWD:/data -w /data nshine/dot dot -Tsvg flux.dot > flux.svg

Please note that svg has references to the icons dir, so it work opnly in that directory.

Example

sample

@lalyos
Copy link
Author

lalyos commented Nov 18, 2020

x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment