sudo docker run -d --restart=unless-stopped -p 80:80 -p 443:443 --privileged rancher/rancher
sudo docker run -d --restart=unless-stopped -p 54580:80 -p 54443:443 --privileged rancher/rancher
This section provides an overview of the architecture options of installing Rancher, describing advantages of each option.
In this section,
Note the restrictedAdmin
Helm chart option available for the Rancher Server . When this option is set to true, the initial Rancher user has restricted access to the local Kubernetes cluster to prevent privilege escalation. For more information, see the section about the restricted-admin role.
Rancher can be installed on these main architectures:
We recommend using Helm, a Kubernetes package manager, to install Rancher on multiple nodes on a dedicated Kubernetes cluster. For RKE clusters, three nodes are required to achieve a high-availability cluster. For K3s clusters, only two nodes are required.
Rancher and Amazon Web Services collaborated on a quick start guide for deploying Rancher on an EKS Kubernetes cluster following AWS best practices. The deployment guide is here.
Rancher can be installed on a single-node Kubernetes cluster. In this case, the Rancher server doesn’t have high availability, which is important for running Rancher in production.
However, this option is useful if you want to save resources by using a single node in the short term, while preserving a high-availability migration path. In the future, you can add nodes to the cluster to get a high-availability Rancher server.
For test and demonstration purposes, Rancher can be installed with Docker on a single node. A local Kubernetes cluster is installed in the single Docker container, and Rancher is installed on the local cluster.
The Rancher backup operator can be used to migrate Rancher from the single Docker container install to an installation on a high-availability Kubernetes cluster. For details, refer to the documentation on migrating Rancher to a new cluster.
参考:
https://github.com/rancher/rancher
https://docs.ranchermanager.rancher.io/pages-for-subheaders/installation-and-upgrade