Trying to insert output from this:
kubectl get pods | grep -Eo '^[^ ]+' | grep portal
Into this:
kubectl exec -it <here> portal bash
Tried:
kubectl exec -it `kubectl get pods | grep -Eo '^[^ ]+' | grep portal ` portal bash
But no luck.
... -it "$(...)" ...
instead of the backticks (quoting is difficult with backticks). – Kusalananda♦ Jun 13 '19 at 16:18