Retrieve the capacity of pods by nodes :

kubectl get nodes -o json | jq '.items[].status.capacity.pods'

Retrieve IPs of all pods in all namespaces :

kubectl get pods -A -o json | jq '.items[].status.podIP'