From 9faaea952368d46626dbbff337e83e28b97cfdfc Mon Sep 17 00:00:00 2001 From: Justin Toh Date: Mon, 20 Sep 2021 22:57:57 +0800 Subject: [PATCH] docs: Update README.md Signed-off-by: Justin Toh --- README.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/README.md b/README.md index fc59293..97b48e5 100644 --- a/README.md +++ b/README.md @@ -1 +1,55 @@ # kubectl-lineage + +[![build](https://github.com/tohjustin/kubectl-lineage/actions/workflows/build.yaml/badge.svg)](https://github.com/tohjustin/kubectl-lineage/actions/workflows/build.yaml) +[![release](https://aegisbadges.appspot.com/static?subject=release&status=v0.1.0&color=318FE0)](https://github.com/tohjustin/kubectl-lineage/releases) +[![kubernetes compatibility](https://aegisbadges.appspot.com/static?subject=k8s%20compatibility&status=v1.19%2B&color=318FE0)](https://endoflife.date/kubernetes) +[![license](https://aegisbadges.appspot.com/static?subject=license&status=Apache-2.0&color=318FE0)](./LICENSE.md) + +A kubectl plugin to display all dependents of a Kubernetes object. + +```shell +$ kubectl lineage node k3d-dev-server-0 +NAMESPACE NAME READY STATUS AGE + Node/k3d-dev-server-0 True KubeletReady 30m + ├── CSINode/k3d-dev-server-0 - 30m +kube-node-lease └── Lease/k3d-dev-server-0 - 30m + +$ kubectl lineage svc/traefik +NAME READY STATUS AGE +Service/traefik - 30m +├── DaemonSet/svclb-traefik 1/1 30m +│ ├── ControllerRevision/svclb-traefik-694565b64f - 30m +│ └── Pod/svclb-traefik-rrpdf 2/2 Running 30m +└── EndpointSlice/traefik-klkwg - 30m + +$ kubectl lineage daemonset.apps svclb-traefik --show-group +NAME READY STATUS AGE +DaemonSet.apps/svclb-traefik 1/1 30m +├── ControllerRevision.apps/svclb-traefik-694565b64f - 30m +└── Pod/svclb-traefik-rrpdf 2/2 Running 30m +``` + +List of supported relationships used for discovering dependent objects: + +- Kubernetes + - [Owner References](https://kubernetes.io/docs/concepts/overview/working-with-objects/owners-dependents/) +- Helm (Coming Soon) + +## Installation + +### Install from Source + +```shell +git clone git@github.com:tohjustin/kubectl-lineage.git +make install + +kubectl-lineage --version +``` + +## Prior Art + +kubectl-lineage has been inspired by the following projects: + +- [ahmetb/kubectl-tree](https://github.com/ahmetb/kubectl-tree) +- [nimakaviani/knative-inspect](https://github.com/nimakaviani/knative-inspect/) +- [steveteuber/kubectl-graph](https://github.com/steveteuber/kubectl-graph)