项目作者: Trois-Six

项目描述 :
Create diagrams from the Kubernetes API with go-diagrams.
高级语言: Go
项目地址: git://github.com/Trois-Six/k8s-diagrams.git
创建时间: 2021-04-26T13:44:26Z
项目社区:https://github.com/Trois-Six/k8s-diagrams

开源协议:Apache License 2.0

下载


Kubernetes diagrams

k8s-diagrams creates diagrams from your kubernetes clusters.


You just have to provide a namespace (or not), and you get a picture from the current state of your cluster. For now it only suppports namespaces, deployments, replicaSets, daemonSets, statefulSets, pods, services and ingresses. I may add other k8s API objects in the future…

How do I build it?

  1. $ make build

Usage

  1. $ ./k8s-diagrams --help
  2. NAME:
  3. k8s-diagrams - Create diagram from the Kubernetes API.
  4. USAGE:
  5. k8s-diagrams [global options] command [command options] [arguments...]
  6. COMMANDS:
  7. help, h Shows a list of commands or help for one command
  8. GLOBAL OPTIONS:
  9. --namespace value, -n value The namespace we want to draw. (default: "default") [$KUBECTL_NAMESPACE]
  10. --kubeconfig value, -c value The path to your kube config file. [$KUBECONFIG]
  11. --outputFilename value, -o value The output filename. (default: "k8s")
  12. --outputDirectory value, -d value The output directory. (default: "diagrams")
  13. --label value, -l value The diagram label. (default: "Kubernetes")
  14. --help, -h show help (default: false)

Usage example

  1. $ ./k8s-diagrams -n mynamespace -d diagrams -o k8s
  2. $ cd diagrams
  3. $ dot -Tpng k8s.dot > k8s.png

Render example

Small namespace

Diagram

Big namespace

Big diagram