Sometmes it would be necessery to identify which priority classes are used in each pod in a kubernetes environment, specially to plan and reorganize priorities in apps deployed. Let's look at a query to view pods with priority classes using kubectl.
Below command will get all pods in all namespaces with their priority classes name and priority value. The highest priority number value is the highet priority.
kubectl get pods --all-namespaces -o custom-columns=NAME:.metadata.name,PRIORITY:.spec.priorityClassName,VALUE:.spec.priority
We can filter for specific namespace if we are only concerend about a given namespace.
No comments:
Post a Comment