I tried this script to see kubernetes volumes usage
k get pods -n elk | jq -s '[flatten | .[].pods[].volume[]? | select(has("pvcRef")) ''{name: .pvcRef.name, capacityBytes, usedBytes, availableBytes, ''percentageUsed: (.usedBytes / .capacityBytes * 100)}]' got this
{name: .pvcRef.name, capacityBytes, usedBytes, availableBytes, percentageUsed: (.usedBytes / .capacityBytes * 100)}] jq: 1 compile error My pods
k get pods -n elk k get pods -n elk
NAME READY STATUS RESTARTS AGE elasticsearch-master-0 1/1 Running 0 24d elasticsearch-master-1 1/1 Running 0 24d filebeat-filebeat-8jdqn 1/1 Running 0 24d filebeat-filebeat-vl9js 1/1 Running 0 24d filebeat-filebeat-xx2fm 1/1 Running 0 24d filebeat-filebeat-zdj5k 1/1 Running 0 22d kibana-kibana-9f5c6f974-kzzpr 0/1 Running 0 24d logstash-logstash-0 1/1 Running 26 (19h ago) 24d then k describe kibana gives
Volumes: kube-api-access-2pizdku: Type: Projected (a volume that contains injected data from multiple sources) TokenExpirationSeconds: 3607 ConfigMapName: kube-root-ca.crt ConfigMapOptional: <nil> And volume
k get pv -n elk NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE pvc-0462020 30Gi RWO Delete Bound elk/elasticsearch-master-elasticsearch-master-1 default Why?
k get pods -n elkat least.''also suggest you may have messed up some copy-pasting.jqshould be a JSON. The output ofk get pods -n elkdoesn't look like JSON to me (unrelated to the error, though).