如何在安装 k3s 时修复 "The term 'sh' is not recognized as the name of a cmdlet, function, script file, or operable program."?
How do I fix "The term 'sh' is not recognized as the name of a cmdlet, function, script file, or operable program." while installing k3s?
我是 kubernetes 和 docker 的新手。我一直在尝试使用网站上提到的命令在我的 Windows 10 系统上安装 k3s:
curl -sfL https://get.k3s.io | sh -
我已经在我的系统上安装了 minikube
、kubectl
和 docker
,并且一切正常。
但是,当我 运行 上述命令时,我收到以下错误消息:
sh : The term 'sh' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:32
+ curl -sfL https://get.k3s.io | sh -
+ ~~
+ CategoryInfo : ObjectNotFound: (sh:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
我做错了什么?
暂时k3s不支持Windows,但是有一个open issue Github你可以跟踪。
installation script you are trying to run, simply won't work on Windows machine. If you take a closer look at the installation requirements section in the very same documentation, you will see the following information, regarding to the supported Operating Systems:
Operating Systems
K3s is expected to work on most modern Linux systems.
Some OSs have specific requirements:
- If you are using Raspbian Buster, follow these steps
to switch to legacy iptables.
- If you are using Alpine Linux, follow these steps
for additional setup.
- If you are using (Red Hat/CentOS) Enterprise Linux, follow these
steps
for additional setup.
For more information on which OSs were tested with Rancher managed K3s
clusters, refer to the Rancher support and maintenance
terms.
所以对于 运行ning k3s 在 Windows 你需要一个 Linux VM 可以使用像 Hyper-V 或 VirtualBox 这样的管理程序进行配置,可以是 运行 在您的 Windows 主机上.
看看下面介绍如何使用 Hyper-V 完成此操作的文章:
我是 kubernetes 和 docker 的新手。我一直在尝试使用网站上提到的命令在我的 Windows 10 系统上安装 k3s:
curl -sfL https://get.k3s.io | sh -
我已经在我的系统上安装了 minikube
、kubectl
和 docker
,并且一切正常。
但是,当我 运行 上述命令时,我收到以下错误消息:
sh : The term 'sh' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:32
+ curl -sfL https://get.k3s.io | sh -
+ ~~
+ CategoryInfo : ObjectNotFound: (sh:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
我做错了什么?
暂时k3s不支持Windows,但是有一个open issue Github你可以跟踪。
installation script you are trying to run, simply won't work on Windows machine. If you take a closer look at the installation requirements section in the very same documentation, you will see the following information, regarding to the supported Operating Systems:
Operating Systems
K3s is expected to work on most modern Linux systems.
Some OSs have specific requirements:
- If you are using Raspbian Buster, follow these steps to switch to legacy iptables.
- If you are using Alpine Linux, follow these steps for additional setup.
- If you are using (Red Hat/CentOS) Enterprise Linux, follow these steps for additional setup.
For more information on which OSs were tested with Rancher managed K3s clusters, refer to the Rancher support and maintenance terms.
所以对于 运行ning k3s 在 Windows 你需要一个 Linux VM 可以使用像 Hyper-V 或 VirtualBox 这样的管理程序进行配置,可以是 运行 在您的 Windows 主机上.
看看下面介绍如何使用 Hyper-V 完成此操作的文章: