It turned out to be unreliable (see https://github.com/kubernetes/kubernetes/issues/112834). Encoding the data inside the command as input for base64 is a workaround that is fine for small amounts of data. It becomes less efficient and/or unusable for large amounts.