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:

  • Avoid persisting mongo data in docker-compose
  • Docker - Install PDO Driver for PHP + Nginx
  • Scaling mysql in Docker
  • Pull docker image behind a corporate firewall throws “Server error: Status 0 while fetching image layer”
  • Docker compose wait for without sleep command
  • Generation of pdf PDFBox headless docker container fails
  • # 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?

  • Not able to access Kibana running in a Docker container on port 5601
  • Performance impact of base image in docker
  • docker registry fail to start up that prompts file not found which file does exist
  • Are Docker images full operating systems? Containers VS Virtual Machines
  • Do you have to remove all stacks at once with docker?
  • Get Docker Container Names
  • 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.