Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jimmymills/k8s-diagram-previewer
Diagram generator for Kubernetes manifests.
https://github.com/jimmymills/k8s-diagram-previewer
diagram helm kubernetes
Last synced: 16 days ago
JSON representation
Diagram generator for Kubernetes manifests.
- Host: GitHub
- URL: https://github.com/jimmymills/k8s-diagram-previewer
- Owner: jimmymills
- License: mit
- Created: 2021-05-22T18:08:55.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-07-20T23:01:39.000Z (over 3 years ago)
- Last Synced: 2023-03-01T12:35:50.627Z (almost 2 years ago)
- Topics: diagram, helm, kubernetes
- Language: Python
- Homepage:
- Size: 94.7 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-kubernetes-architecture-diagrams - K8s Diagram Previewer
- awesome-kubernetes-architecture-diagrams - K8s Diagram Previewer
README
# K8s Diagram Previewer
This project exists to help developers take some of the guesswork
out of deploying Kubernetes definitions by providing a preview of
what will actually be deployed with a set of YAML definitions.## Installation
Run `pip install k8s-diagram`
You may also need to install [graphviz](https://graphviz.org/download/).
## Running
This script takes one argument, a path to a folder containing K8s
YAML definitions and outputs a PNG diagram at kubernetes.png
representing those definitions, as well as a python file at
create_diagram.py if you would like to extend the diagram with
other infrastructure surrounding your project. To automatically
open the image upon completion, add the `--show` flag.`k8s-diagram `
To try out the example, run `k8s-diagram ./examples/yaml`
For Helm Charts, simply run with the --helm flag and your chart will be
templated and placed into `/tmp/helm_preview_yaml/chart.yaml` before the script runs.You can also pass in a context from kubeconfig with the `--cluster-context` flag to pull in all supported resources from
the target context prior to diagram generation. The resources found at the context will be copied into the target folder
prior to chart generation.Run `k8s-diagram --help` to see other available options.
## Docker
You can alternatively run this project by running the docker image and mounting the yaml you want to use to /target. The image will be saved into the folder mounted to /target.
Ex: `docker run -v "$(pwd)/k8s_yaml:/target" jimmymills/k8s-diagram /target`
For Helm: `docker run -v "$(pwd):/target" -v "$(pwd)/example_helm:/helm" diagram /helm --helm`
## Support
This tool currently supports the following Kubernetes resource types:
* Deployment
* Service
* Ingress
* Pod
* CronJob
* Job
* DaemonSet
* StatefulSet
* ConfigMap
* Secret
* PersistentVolumeClaimThere is partial support for all node types listed at https://diagrams.mingrammer.com/docs/nodes/k8s but links will not be formed.