Can't run a docker container on kubernetes in the interactive mode

Here is a post about kubectl run command –

I have tried to run the docker container with the -i option, like in the example:

  • How to access a docker image?
  • ssh issue of docker in redhat 6.5
  • Docker container mounting a database from another container
  • node.js in a dockerfile cant connect to mongolabs via mongoose: getaddrinfo ESRCH
  • Visual Studio 2017 Docker project on Windows volumes issue
  • Should I add the reverse proxy in the same container as the application on docker?
  • # Start a single instance of busybox and keep it in the foreground, don't restart it if it exits.
    kubectl run -i --tty busybox --image=busybox --restart=Never

    However, kubectl says that -i is an unknown command.

    Error: unknown shorthand flag: 'i' in -i
    Run 'kubectl help' for usage.

    Any ideas?

  • Simple example of Vagrantfile / Dockerfile to run node app
  • Why kubernetes-scheduler and controller-manager is stopped sometime in etcd master (three nodes)
  • Some questions from a newbie on Docker and Docker Elasticsearch image
  • Docker application deployment DEV vs TEST
  • How to bind the VM docker-machine creates to OSX IP address?
  • how do you manage secret values with docker-compose v3.1?
  • One Solution collect form web for “Can't run a docker container on kubernetes in the interactive mode”

    It’s likely that your kubectl client is out of date, because your command line works for me:

    $ kubectl version
    Client Version: version.Info{Major:"1", Minor:"2", GitVersion:"v1.2.0", GitCommit:"5cb86ee022267586db386f62781338b0483733b3", GitTreeState:"clean"}
    Server Version: version.Info{Major:"1", Minor:"2", GitVersion:"v1.2.2", GitCommit:"528f879e7d3790ea4287687ef0ab3f2a01cc2718", GitTreeState:"clean"}
    $ kubectl run -i --tty busybox --image=busybox --restart=Never
    Waiting for pod default/busybox-dikev to be running, status is Pending, pod ready: false
    Hit enter for command prompt
    / #
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.