Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get all pods per node #6

Open
gabrie30 opened this issue Jun 21, 2021 · 0 comments
Open

get all pods per node #6

gabrie30 opened this issue Jun 21, 2021 · 0 comments

Comments

@gabrie30
Copy link
Owner

gabrie30 commented Jun 21, 2021

export NAMESPACE=foobar

for n in $(kubectl get nodes --no-headers | cut -d " " -f1); do 
    echo Node: $n
    kubectl get pods -n $NAMESPACE --no-headers --field-selector spec.nodeName=${n} 
    echo
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant