Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于Windows中增加负载命令出现的/bin/bash 不存在解决方案。 #771

Open
LayneChai opened this issue May 8, 2023 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@LayneChai
Copy link

关于Windows中增加负载命令出现的/bin/bash 不存在解决方案。

Environment (please complete the following information):

  • K8S Version: [e.g. 1.19]
  • Crane Version: [e.g. 0.1.0]
  • Browser [e.g. chrome, safari]
  • whindows10

问题出现点:
创建 EffectiveHPA之后需要执行增加负载的命令 kubectl run -i --tty load-generator --rm --image=busybox:1.28 --restart=Never -- /bin/sh -c "while sleep 0.01; do wget -q -O- http://php-apache; done"
报错提示C:/Program Files/Git/usr/bin/sh: no such file or directory

解决方案:
如果再windows中的git bash中执行这个命令export KUBECONFIG=${HOME}/.kube/config_crane并不能解决上方的错误 .

  1. 打开powershell,先用如下命令设置临时环境变量
    $env:KUBECONFIG="${HOME}/.kube/config_crane"
  2. 再执行增加负载 kubectl run -i --tty load-generator --rm --image=busybox:1.28 --restart=Never -- /bin/sh -c "while sleep 0.01; do wget -q -O- http://php-apache; done" 就成功了。
@LayneChai LayneChai added the kind/bug Something isn't working label May 8, 2023
@qmhu qmhu added documentation Improvements or additions to documentation and removed kind/bug Something isn't working labels May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants