kubectl: get secret with jsonpath and add a newline

1 · Thiago Perrotta · July 9, 2024, 10:45 a.m.
Summary
When retrieving opaque secrets with kubectl, one will often invoke this typical command: ubuntu@ubuntu:~ $ kubectl get secret -n argocd argocd-github-webhook-secret -o jsonpath='{.data.value}' eW91IGFyZSBjdXJpb3VzIGFyZW50IHlvdQ==ubuntu@ubuntu:~ $ But isn’t this ugly? The prompt is concatenated with the output....