Skip to content
forked from mkimuram/k8sviz

Generate Kubernetes architecture diagrams from the actual state in a namespace

License

Notifications You must be signed in to change notification settings

MahipalRao/k8sviz

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

k8sviz

k8sviz is a tool to generate Kubernetes architecture diagrams from the actual state in a namespace. Currently, this only generates a diagram similar to https://github.com/kubernetes/community/tree/master/icons#usage-example by using graphviz. For examples of the generated diagrams, see Examples below.

Prerequisites

k8sviz.sh is implemented as bash script and depends on below commands:

  • awk
  • bash
  • cat
  • dot (graphviz)
  • getopt
  • grep
  • kubectl
  • sed
  • seq
  • tr

Installation

Just git clone this repository or copy k8sviz.sh file and icons directory with keeping directory structure.

Usage

$ ./k8sviz.sh --help
Generate Kubernetes architecture diagrams from the actual state in a namespace
Usage:
  k8sviz.sh [options]
Options:
  -h, --help                 Displays the help text
  -n, --namespace            The namespace to visualize. Default is default
  -o, --outfile              The filename to output. Default is k8sviz.out
  -t, --type                 The type of output. Default is dot

Examples

Examples for tutorial deployments in default namespace

  • Generate dot file for namespace default
$ ./k8sviz.sh -n default -o default.dot
  • Generate png file for namespace default
$ ./k8sviz.sh -n default -t png -o default.png

Examples for more complex deployment (kubeflow case)

  • Generate dot file for namespace kubeflow and istio-system
$ ./k8sviz.sh -n kubeflow -o examples/kubeflow/kubeflow.dot
$ ./k8sviz.sh -n istio-system -o examples/kubeflow/istio-system.dot
  • Generate png file for namespace kubeflow and istio-system
$ ./k8sviz.sh -n kubeflow -t png -o examples/kubeflow/kubeflow.png
$ ./k8sviz.sh -n istio-system -t png -o examples/kubeflow/istio-system.png

License

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

About

Generate Kubernetes architecture diagrams from the actual state in a namespace

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Shell 100.0%