红联Linux门户
Linux帮助

kubernetes中执行kubectl报错:kubectl: command not found

发布时间:2016-04-11 15:01:38来源:linux网站作者:zczzsq

在Ubuntu14上成功安装了kubernetes1.2.1 到主机上之后,运行: kubectl get nodes 查看节点报错kubectl: command not found。


报错的原因:kubectl没有添加到系统的环境变量中。


报错的解决方法:

1:首先用命令find / -name kubectl   查找kubectl所在的位置

我的环境kubectl所在的位置:/root/ubuntu/binaries/kubectl


2:将这个路径添加到系统的path,编辑 vim /etc/profile。

在profile中添加:export PATH="/root/ubuntu/binaries/:$PATH"


本文永久更新地址:http://www.linuxdiyf.com/linux/19684.html