Cheetsheet for Kubernetes
Query By Annotation with kubectl
|
|
If you wanted to pull multiple values for the object, you can use range on each object found.
|
|
https://fabianlee.org/2022/06/18/kubernetes-query-by-annotation-with-kubectl/
Kubectl custom columns
https://technekey.com/customizing-the-kubectl-output/
|
|
查询集群中 requests 资源
kubectl get nodes --selector=nodeLevel=aiali --selector=specification=efg1.nvga8n --selector=tce.kubernetes.io/rdmaminipod=P11 --no-headers | awk '{print $1}' | xargs -I {} sh -c 'echo {}; kubectl --kubeconfig=/home/houminwei/.kube/view-hl.config describe node | grep -A 14 "Allocated" | grep -ve Event -ve Allocated -ve percent -ve --; echo'
Author Houmin Wei
Publish February 17, 2023
LastMod August 27, 2026
License 本作品采用 CC BY-NC-ND 4.0 许可协议进行许可,转载时请注明原文链接
如果你在浏览博客的过程中发现了任何问题,欢迎在对应文章下评论。如果你有其他事情想要咨询,可以通过邮件联系我。
Linked Mentions