kube-lineage是一个kubectl插件,用来展示Kubernetes集群资源的所有依赖资源或附属资源。
使用
$kube-lineagepodcoredns-5cc79d4bf5-xgvkc--dependenciesNAMESPACENAMEREADYSTATUSAGEkube-systemPod/coredns-5cc79d4bf5-xgvkc1/1Running30m├──Node/k3d-serverTrueKubeletReady30m├──PodSecurityPolicy/system-unrestricted-psp-30mkube-system├──ConfigMap/coredns-30mkube-system├──ReplicaSet/coredns-5cc79d4bf51/130mkube-system│└──Deployment/coredns1/130mkube-system├──Secret/coredns-token-6vsx4-30mkube-system│└──ServiceAccount/coredns-30m│├──ClusterRoleBinding/system:basic-user-30m││└──ClusterRole/system:basic-user-30m│├──ClusterRoleBinding/system:coredns-30m││└──ClusterRole/system:coredns-30m│├──ClusterRoleBinding/system:discovery-30m││└──ClusterRole/system:discovery-30m│├──ClusterRoleBinding/system:public-info-viewer-30m││└──ClusterRole/system:public-info-viewer-30mkube-system│└──RoleBinding/system-unrestricted-svc-acct-psp-rolebinding-30m│└──ClusterRole/system-unrestricted-psp-role-30m│└──PodSecurityPolicy/system-unrestricted-psp-30mkube-system└──ServiceAccount/coredns-30m安装
通过 krew 安装
$kubectlkrewinstalllineage$kubectllineage--version从源代码进行安装
$gitclonegit@github.com:tohjustin/kube-lineage.git&&cdkube-lineage$makeinstall$kube-lineage--version
评论