Kubernetes 查找不使用';你没有时间表上的污点吗?

Kubernetes 查找不使用';你没有时间表上的污点吗?,kubernetes,Kubernetes,什么是kubectl命令,它列出了所有没有NoSchedule污染的节点 什么是kubectl命令,它列出了确实有NoSchedule污染的所有节点?您可以使用jsonpath获得节点和污染 kubectl get node -o jsonpath='{range .items[*]}{@.metadata.name}{"\t"}{@.spec.taints[*].effect}{"\n"}{end}' 没有时间表 kubectl get node

什么是
kubectl
命令,它列出了所有没有
NoSchedule
污染的节点


什么是
kubectl
命令,它列出了确实有
NoSchedule
污染的所有节点?

您可以使用
jsonpath
获得节点和污染

 kubectl get node -o jsonpath='{range .items[*]}{@.metadata.name}{"\t"}{@.spec.taints[*].effect}{"\n"}{end}'
没有时间表

 kubectl get node -o jsonpath='{range .items[*]}{@.metadata.name}{"\t"}{@.spec.taints[*].effect}{"\n"}{end}' | grep NoSchedule
 kubectl get node -o jsonpath='{range .items[*]}{@.metadata.name}{"\t"}{@.spec.taints[*].effect}{"\n"}{end}' | grep -v NoSchedule
没有时间表

 kubectl get node -o jsonpath='{range .items[*]}{@.metadata.name}{"\t"}{@.spec.taints[*].effect}{"\n"}{end}' | grep NoSchedule
 kubectl get node -o jsonpath='{range .items[*]}{@.metadata.name}{"\t"}{@.spec.taints[*].effect}{"\n"}{end}' | grep -v NoSchedule

使用
jsonpath
可以获得节点和污点

 kubectl get node -o jsonpath='{range .items[*]}{@.metadata.name}{"\t"}{@.spec.taints[*].effect}{"\n"}{end}'
没有时间表

 kubectl get node -o jsonpath='{range .items[*]}{@.metadata.name}{"\t"}{@.spec.taints[*].effect}{"\n"}{end}' | grep NoSchedule
 kubectl get node -o jsonpath='{range .items[*]}{@.metadata.name}{"\t"}{@.spec.taints[*].effect}{"\n"}{end}' | grep -v NoSchedule
没有时间表

 kubectl get node -o jsonpath='{range .items[*]}{@.metadata.name}{"\t"}{@.spec.taints[*].effect}{"\n"}{end}' | grep NoSchedule
 kubectl get node -o jsonpath='{range .items[*]}{@.metadata.name}{"\t"}{@.spec.taints[*].effect}{"\n"}{end}' | grep -v NoSchedule