Skip to content

knabben/k8s-graph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

k8s-graph

Kubernetes ownerReferences dependency graph.

Running

Suppose you have an vSphereMachine object on your cluster named tkg-windows-wl-windows-containerd-jmjht

go build ./...
./k8s-graph --name "tkg-windows-wl-windows-containerd-jmjht" --resource=vspheremachines --group "infrastructure.cluster.x-k8s.io" --version "v1beta1"

Checking the GVR

You can check the API resources available on your cluster with:

$ kubectl api-resources

clusterclasses                    cc           cluster.x-k8s.io/v1beta1                             true         ClusterClass
clusters                          cl           cluster.x-k8s.io/v1beta1                             true         Cluster
machinedeployments                md           cluster.x-k8s.io/v1beta1                             true         MachineDeployment
machinehealthchecks               mhc,mhcs     cluster.x-k8s.io/v1beta1                             true         MachineHealthCheck
machinepools                      mp           cluster.x-k8s.io/v1beta1                             true         MachinePool
machines                          ma           cluster.x-k8s.io/v1beta1                             true         Machine
machinesets                       ms           cluster.x-k8s.io/v1beta1                             true         MachineSet
...
vsphereclusteridentities                       infrastructure.cluster.x-k8s.io/v1beta1              false        VSphereClusterIdentity
vsphereclusters                                infrastructure.cluster.x-k8s.io/v1beta1              true         VSphereCluster
vsphereclustertemplates                        infrastructure.cluster.x-k8s.io/v1beta1              true         VSphereClusterTemplate
vspheredeploymentzones                         infrastructure.cluster.x-k8s.io/v1beta1              false        VSphereDeploymentZone
vspherefailuredomains                          infrastructure.cluster.x-k8s.io/v1beta1              false        VSphereFailureDomain
vspheremachines                                infrastructure.cluster.x-k8s.io/v1beta1              true         VSphereMachine
vspheremachinetemplates                        infrastructure.cluster.x-k8s.io/v1beta1              true         VSphereMachineTemplate
vspherevms                                     infrastructure.cluster.x-k8s.io/v1beta1              true         VSphereVM

Generating graph

After running the command, uou can use some online graphic generator website: https://dreampuf.github.io/GraphvizOnline.

Capture

About

Kubernetes ownerReferences graphs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages