You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A tool for visualizing Kubernetes infrastructure manifest using d2.
Overview
This program reads Kubernetes YAML manifests and generates a visual diagram of the infrastructure and its connections. By parsing the communication annotations from the Kubernetes manifests, it creates a diagram showing how different services and deployments interact with each other.
Features
Parse Kubernetes YAML manifests: Reads and parses Kubernetes manifests from a directory.
Generate diagrams: Creates a visual representation of the infrastructure based on communication annotations.
Output formats: Generates diagrams in both SVG and PNG formats.
Installation
Clone the repository:
git clone git@github.com:kocierik/k8s-to-diagram.git
cd k8s-to-diagram
Build the application:
go build -o k8s-diagram
Running with Docker
You can also run the application using Docker, which makes it easier to manage dependencies and run the program in a consistent environment.
Build the Docker image:
docker build -t diagram:1.0 .
Run the Docker container:
docker run -v ./manifests:/manifests -v ./images:/images diagram:1.0
Configuration
Ensure that your Kubernetes YAML manifests include communication annotations in the following example format: