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

Here is a post about kubectl run command – http://kubernetes.io/docs/user-guide/kubectl/kubectl_run/

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

  • Mesos API for starting and stopping Slave nodes
  • Securing services within Docker container Using Identity Providers hosted within a container
  • Run spark-shell inside Docker container against remote YARN cluster
  • Elastic Beanstalk with multiple environments and URL routing between them
  • How do you use docker-compose from a Gitlab Registry on DigitalOcean?
  • How to access docker container service from outside world like from parent windows host machine
  • # 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?

  • Using load testing app in docker
  • SSH connection fails to disconnect
  • How to run Docker inside Jenkins which is running as container
  • Class 'MongoId' not found in Laradock application
  • Script to clone/snapshot Docker Containers including their Data?
  • Run mysql instance in Docker container
  • 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.