The answer was to ask ChatGPT to solve the question for me:

; kubectl get pods –all-namespaces -o jsonpath="{range .items[]}{.spec.containers[].name}{'\n'}{end}"

Gwendolyn James @gwynforthewyn