Kubectl Ownerrefs
Introduction
kubectl ownerref
is a simple kubectl plugin for getting all the resources in a cluster that another resource has ownerrefs on. It gives the basic information at a quick glance. It is used in cluster-addons to get the resources that a custom resource has ownerrefs on.
Usage
- Get the code
go get https://github.com/kubernetes-sigs/cluster-addons
- Build
cd $GOPATH/kubernetes-sigs/cluster-addons/tools/kubectl-ownerref
go install
- Run the go program
kubectl ownerref <KIND> <NAME>
Example:
kubectl ownerref Dashboard dashboard_sample
Have fun! 🎉