Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/SocialGouv/react-k8s-viewer

Render diagrams from your kubernetes manifests
https://github.com/SocialGouv/react-k8s-viewer

diagram k8s kubernetes reactjs

Last synced: 10 days ago
JSON representation

Render diagrams from your kubernetes manifests

Awesome Lists containing this project

README

        

# @socialgouv/react-k8s-viewer

Render diagrams from your kubernetes manifests.

Use [kubernetes-models-ts](https://github.com/tommy351/kubernetes-models-ts), [react-flow](https://reactflow.dev/) and [dagre](https://github.com/dagrejs/dagre) for layouting.

See demo : https://socialgouv.github.io/react-k8s-viewer

![](./demo.png)

## Usage

`K8sViewer` expect a list of `Manifest` or a `ManifestList` as JSON

```js
import { K8sViewer } from "@socialgouv/react-k8s-viewer";

import manifests from "./manifests.json";

const App = () => (




);
```

To extract the manifests from some namespace:

```sh
kubectl --namespace some-app get deploy,ing,service,secret,sealedsecret,configmap -ojson > manifests.json
```

## Todo:

- handle multiple namespaces