kubernetes: kubectl run --pod-running-timeout doesn't work

/kind bug

What happened: kubectl run --pod-running-timeout=1m0s doesn’t wait for pods to appear not by default, not explicitly:

  --pod-running-timeout=1m0s: The length of time (like 5s, 2m, or 3h, higher than zero) to
wait until at least one pod is running

What you expected to happen: Expect it to pause until at least one pod is available.

How to reproduce it (as minimally and precisely as possible): Get it into the shell script:

minikube start --vm-driver=kvm
kubectl run kubermarkets --image=cybernode/cm-app --port=80 --pod-running-timeout=1m0s
kubectl get pods

there are no 1m pauses, and the output is the following

...
Kubectl is now configured to use the cluster.
replicationcontroller "kubermarkets" created
No resources found.

Environment:

  • Kubernetes version (use kubectl version): Client Version: version.Info{Major:“1”, Minor:“7”, GitVersion:“v1.7.5”, GitCommit:“17d7182a7ccbb167074be7a87f0a68bd00d58d97”, GitTreeState:“clean”, BuildDate:“2017-08-31T09:14:02Z”, GoVersion:“go1.8.3”, Compiler:“gc”, Platform:“linux/amd64”} Server Version: version.Info{Major:“1”, Minor:“7”, GitVersion:“v1.7.0”, GitCommit:“d3ada0119e776222f11ec7945e6d860061339aad”, GitTreeState:“clean”, BuildDate:“2017-07-26T00:12:31Z”, GoVersion:“go1.8.3”, Compiler:“gc”, Platform:“linux/amd64”}

  • Cloud provider or hardware configuration**:

  • OS (e.g. from /etc/os-release): “Fedora 26 (Workstation Edition)”

  • Kernel (e.g. uname -a): 4.12.9-300.fc26.x86_64 #1 SMP Fri Aug 25 13:09:43 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

  • Install tools:

  • Others:

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 4
  • Comments: 29 (9 by maintainers)

Most upvoted comments

This does not work with kubectl logs as well.

/reopen

Need to test that there is a way to wait for a pod to start.