Currently you need to explicitly pass pod name to connect to when invoking oc rsh. Upstream updated kubectl exec [1] to work with resource/name format. We want to go one step further and support -f which reads a resource from a file and work against it. For that we need to update ExecOptions (core of kubectl exec) which is then used inside oc rsh. [1] https://github.com/kubernetes/kubernetes/pull/73664
This will be fixed with k8s 1.16 bump from https://github.com/openshift/oc/pull/102
The 1.16 landed in oc, moving to QA
Unpack oc from latest http://download-node-02.eng.bos.redhat.com/rcm-guest/puddles/RHAOS/AtomicOpenShift/4.3/v4.3.0-201910140317_2019-10-14.2/x86_64/os/Packages/ openshift-clients-4.3.0-201910101400.git.1.fe72907.el7.x86_64.rpm and check, no -f flag: $ ./oc version -o yaml clientVersion: buildDate: "2019-10-10T18:03:00Z" compiler: gc gitCommit: b6f4792b69cc6cb9d07f8ba88e73831c8a8fc470 gitTreeState: clean gitVersion: v4.3.0 goVersion: go1.12.8 major: "" minor: "" platform: linux/amd64 $ ./oc rsh -f ~/my/pod.yaml Error: unknown shorthand flag: 'f' in -f ...
PS: above oc of commit b6f4792 included the fix PR oc/pull/102: $ cd /data/src/github.com/openshift/oc $ git pull $ git log --date=local b6f4792 --pretty="%h %an %cd - %s" | grep "#102" 5266406df OpenShift Merge Robot Thu Sep 26 18:19:06 2019 - Merge pull request #102 from soltysh/oc-4.3-kubernetes-1.16.0-rc.2
The upstream change of `Upstream updated kubectl exec to work with resource/name format` is what was picked up with k8s 1.16 bump. The additional desired change of allowing to pass a '-f filename' will be an additional upstream PR, I'm moving this bug to 4.4, since the upstream PR will be required.
*** This bug has been marked as a duplicate of bug 1801292 ***