Files
chill_notes/Docker/Rancher_如何在同一个主机上运行Rancher-Rancher和Rancher-Rancher-Agent.md
2026-04-21 17:41:25 +08:00

7 lines
957 B
Markdown
Executable File
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
==.==
==在您想要使用单个节点运行Rancher并且能够将相同节点添加到集群的情况下您必须调整为====rancher/rancher====容器映射的主机端口。==
==如果一个节点被添加到集群它将部署使用端口80和443的ingress控制器。这与====rancher/rancher====容器默认映射的端口冲突。==
==注意不建议在生产中把Rancher/Rancher和Rancher/Rancher-Agent运行在一台主机上但可用于开发/演示。==
==要更改主机端口映射,替换====-p 80:80 -p 443:443====为====-p 8080:80 -p 8443:443====:==
docker run -d --restart=unless-stopped \ -p 8080:80 -p 8443:443 \ -v <主机路径>:/var/lib/rancher/ \ rancher/rancher:stable (或者rancher/rancher:latest)
> 来自 <[https://docs.rancher.cn/rancher2x/faqs/important-issue.html#_4-%E6%95%B0%E6%8D%AE%E6%8C%81%E4%B9%85](https://docs.rancher.cn/rancher2x/faqs/important-issue.html#_4-%E6%95%B0%E6%8D%AE%E6%8C%81%E4%B9%85)>