if "creation" command fails, sleep 1
while true; do
kubectl get namespace mynamespace && break
kubectl create namespace mynamespace || sleep 1
require "pty" | |
stderr_reader, stderr_writer = IO.pipe | |
args = ["-c", "read a; echo was: $a; echo err:$a >&2"] | |
stdout,stdin,pid = PTY.spawn("/bin/bash", *args, err: stderr_writer.fileno) | |
stderr_writer.close | |
stdin.puts "hello" |