栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

ERROR: Rancher must be ran with the --privileged flag when running outside of Kubernetes

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

ERROR: Rancher must be ran with the --privileged flag when running outside of Kubernetes

按照rancher2.4的官网文档, 只需要一台 Linux 主机,记可以快速部署一个单节点的rancher server, 当然这只能做测试使用 。 部署十分方便,只需在主机上启动dcoker, 然后起一个容器:

sudo docker run -d --restart=unless-stopped -p 80:80 -p 443:443 rancher/rancher

测试一下发现,容器启动后在不断重启,没有办法进入UI, 提示网络错误。

ConTAINER ID        IMAGE               COMMAND             CREATED             STATUS                         PORTS               NAMES
bfd5c52a1ce7        rancher/rancher     "entrypoint.sh"     12 hours ago        Restarting (1) 3 seconds ago                       elated_heisenberg

查看日志:

[root@k8s-node02 ~]# docker logs --tail 3 bfd5c52a1ce7
ERROR: Rancher must be ran with the --privileged flag when running outside of Kubernetes
ERROR: Rancher must be ran with the --privileged flag when running outside of Kubernetes
ERROR: Rancher must be ran with the --privileged flag when running outside of Kubernetes

发现报错说 需要 --privileged,增加特权。
关掉重起加 --privileged 试试:

docker run -d --restart=unless-stopped --privileged  -p 80:80  -p 443:443 rancher/rancher

发现可以了

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/342126.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号