虚拟机 环境:centos7.4
创建好yaml 文件,执行kubectl create -f 文件名 时。报错如下:
The connection to the server localhost:8080 was refused - did you specify the right host or port?
解决办法:
vim /etc/kubernetes/apiserver
删除ServiceAccount 选项。
重启kube-apiserver 即可解决。作为记录使用
最后
以上就是文艺秀发最近收集整理的关于解决kubectl create -f 如下报错的全部内容,更多相关解决kubectl内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复