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:

  • Why are Docker build commands running so slow in Elastic Beanstalk?
  • How to set up etheruem nodes using docker?
  • Travis Docker Image missing Python 3.5
  • What should WSO2 APIM <localMemberHost> parameter contain in the config and what it is used by the APIM?
  • Maven run docker image with java ee application
  • Why am I getting UTF-8 invalid bye sequence ArgumentErrors in dotenv only on EC2?
  • # 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?

  • how to clean up docker overlay directory?
  • docker-compose not setting environment variables with flask
  • Why does Docker build take long time in “Sending context to daemon” step?
  • Rename file in docker container
  • Dockerfile for on and off proxy
  • docker - build fails when COPYing file to root
  • 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.