Last active
August 4, 2024 04:46
-
-
Save nyrahul/b099e8df77ac9d83eec5bad21b27f1cf to your computer and use it in GitHub Desktop.
Check cluster kueue job status
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Show all workloads/jobs | |
kubectl get workload -A -o json | jq '.items[] | "\(.metadata.namespace) \(.metadata.name) \(.status.conditions[-1].type)"' | |
# Show Admitted workloads/jobs | |
kubectl get workload -A -o json | jq -c '.items[] | select(.status.conditions[-1].type == "Admitted") | [.metadata.namespace,.metadata.name]' | |
# Get all jobs across all namespaces in Pending state ... AccuKnox executes the jobs in init containers | |
kubectl get pods -A --selector job-type=accuknox-jobs --field-selector=status.phase==Pending | |
# list k8s-jobs queue | |
kubectl get jobs -A -l "kueue.x-k8s.io/queue-name=jobs-queue" | |
kubectl get jobs -A --sort-by .status.startTime -l "kueue.x-k8s.io/queue-name=jobs-queue" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment