mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-09-26 13:08:11 +00:00
[2.0-2.4] Move files out of pages-for-subheaders
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
---
|
||||
title: Best Practices Guide
|
||||
---
|
||||
|
||||
<head>
|
||||
<link rel="canonical" href="https://ranchermanager.docs.rancher.com/pages-for-subheaders/best-practices"/>
|
||||
</head>
|
||||
|
||||
The purpose of this section is to consolidate best practices for Rancher implementations. This also includes recommendations for related technologies, such as Kubernetes, Docker, containers, and more. The objective is to improve the outcome of a Rancher implementation using the operational experience of Rancher and its customers.
|
||||
|
||||
If you have any questions about how these might apply to your use case, please contact your Customer Success Manager or Support.
|
||||
|
||||
Use the navigation bar on the left to find the current best practices for managing and deploying the Rancher Server.
|
||||
|
||||
For more guidance on best practices, you can consult these resources:
|
||||
|
||||
- [Security](../rancher-security/rancher-security.md)
|
||||
- [Rancher Blog](https://www.suse.com/c/rancherblog/)
|
||||
- [Rancher Forum](https://forums.rancher.com/)
|
||||
- [Rancher Users Slack](https://slack.rancher.io/)
|
||||
- [Rancher Labs YouTube Channel - Online Meetups, Demos, Training, and Webinars](https://www.youtube.com/channel/UCh5Xtp82q8wjijP8npkVTBA/featured)
|
||||
@@ -12,7 +12,7 @@ Don't run other workloads or microservices in the Kubernetes cluster that Ranche
|
||||
### Don't Run Rancher on a Hosted Kubernetes Environment
|
||||
When the Rancher server is installed on a Kubernetes cluster, it should not be run in a hosted Kubernetes environment such as Google's GKE, Amazon's EKS, or Microsoft's AKS. These hosted Kubernetes solutions do not expose etcd to a degree that is manageable for Rancher, and their customizations can interfere with Rancher operations.
|
||||
|
||||
It is strongly recommended to use hosted infrastructure such as Amazon's EC2 or Google's GCE instead. When you create a cluster using RKE on an infrastructure provider, you can configure the cluster to create etcd snapshots as a backup. You can then [use RKE](https://rancher.com/docs/rke/latest/en/etcd-snapshots/) or [Rancher](../../pages-for-subheaders/backup-restore-and-disaster-recovery.md) to restore your cluster from one of these snapshots. In a hosted Kubernetes environment, this backup and restore functionality is not supported.
|
||||
It is strongly recommended to use hosted infrastructure such as Amazon's EC2 or Google's GCE instead. When you create a cluster using RKE on an infrastructure provider, you can configure the cluster to create etcd snapshots as a backup. You can then [use RKE](https://rancher.com/docs/rke/latest/en/etcd-snapshots/) or [Rancher](../../how-to-guides/new-user-guides/backup-restore-and-disaster-recovery/backup-restore-and-disaster-recovery.md) to restore your cluster from one of these snapshots. In a hosted Kubernetes environment, this backup and restore functionality is not supported.
|
||||
|
||||
### Make sure nodes are configured correctly for Kubernetes
|
||||
It's important to follow K8s and etcd best practices when deploying your nodes, including disabling swap, double checking you have full network connectivity between all machines in the cluster, using unique hostnames, MAC addresses, and product_uuids for every node, checking that all correct ports are opened, and deploying with ssd backed etcd. More details can be found in the [kubernetes docs](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#before-you-begin) and [etcd's performance op guide](https://etcd.io/docs/v3.4/op-guide/performance/)
|
||||
@@ -27,11 +27,11 @@ For best performance, run all three of your nodes in the same geographic datacen
|
||||
It's strongly recommended to have a "staging" or "pre-production" environment of the Kubernetes cluster that Rancher runs on. This environment should mirror your production environment as closely as possible in terms of software and hardware configuration.
|
||||
|
||||
### Monitor Your Clusters to Plan Capacity
|
||||
The Rancher server's Kubernetes cluster should run within the [system and hardware requirements](../../pages-for-subheaders/installation-requirements.md) as closely as possible. The more you deviate from the system and hardware requirements, the more risk you take.
|
||||
The Rancher server's Kubernetes cluster should run within the [system and hardware requirements](../../getting-started/installation-and-upgrade/installation-requirements/installation-requirements.md) as closely as possible. The more you deviate from the system and hardware requirements, the more risk you take.
|
||||
|
||||
However, metrics-driven capacity planning analysis should be the ultimate guidance for scaling Rancher, because the published requirements take into account a variety of workload types.
|
||||
|
||||
Using Rancher, you can monitor the state and processes of your cluster nodes, Kubernetes components, and software deployments through integration with Prometheus, a leading open-source monitoring solution, and Grafana, which lets you visualize the metrics from Prometheus.
|
||||
|
||||
After you [enable monitoring](../../pages-for-subheaders/cluster-monitoring.md) in the cluster, you can set up [a notification channel](../../explanations/integrations-in-rancher/notifiers.md) and [cluster alerts](../../pages-for-subheaders/cluster-alerts.md) to let you know if your cluster is approaching its capacity. You can also use the Prometheus and Grafana monitoring framework to establish a baseline for key metrics as you scale.
|
||||
After you [enable monitoring](../../explanations/integrations-in-rancher/cluster-monitoring/cluster-monitoring.md) in the cluster, you can set up [a notification channel](../../explanations/integrations-in-rancher/notifiers.md) and [cluster alerts](../../explanations/integrations-in-rancher/cluster-alerts/cluster-alerts.md) to let you know if your cluster is approaching its capacity. You can also use the Prometheus and Grafana monitoring framework to establish a baseline for key metrics as you scale.
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ These tips can help you solve problems before they happen.
|
||||
|
||||
### Run Rancher on a Supported OS and Supported Docker Version
|
||||
|
||||
Rancher is container-based and can potentially run on any Linux-based operating system. However, only operating systems listed in the [requirements documentation](../../pages-for-subheaders/installation-requirements.md) should be used for running Rancher, along with a supported version of Docker. These versions have been most thoroughly tested and can be properly supported by the Rancher Support team.
|
||||
Rancher is container-based and can potentially run on any Linux-based operating system. However, only operating systems listed in the [requirements documentation](../../getting-started/installation-and-upgrade/installation-requirements/installation-requirements.md) should be used for running Rancher, along with a supported version of Docker. These versions have been most thoroughly tested and can be properly supported by the Rancher Support team.
|
||||
|
||||
### Upgrade Your Kubernetes Version
|
||||
|
||||
@@ -50,7 +50,7 @@ Certificates can be renewed for Rancher-provisioned clusters [through the Ranche
|
||||
|
||||
### Enable Recurring Snapshots for Backing up and Restoring the Cluster
|
||||
|
||||
Make sure etcd recurring snapshots are enabled. Extend the snapshot retention to a period of time that meets your business needs. In the event of a catastrophic failure or deletion of data, this may be your only recourse for recovery. For details about configuring snapshots, refer to the [RKE documentation](https://rancher.com/docs/rke/latest/en/etcd-snapshots/) or the [Rancher documentation on backups](../../pages-for-subheaders/backup-restore-and-disaster-recovery.md).
|
||||
Make sure etcd recurring snapshots are enabled. Extend the snapshot retention to a period of time that meets your business needs. In the event of a catastrophic failure or deletion of data, this may be your only recourse for recovery. For details about configuring snapshots, refer to the [RKE documentation](https://rancher.com/docs/rke/latest/en/etcd-snapshots/) or the [Rancher documentation on backups](../../how-to-guides/new-user-guides/backup-restore-and-disaster-recovery/backup-restore-and-disaster-recovery.md).
|
||||
|
||||
### Provision Clusters with Rancher
|
||||
|
||||
@@ -102,13 +102,13 @@ Provision three or more control plane nodes. Some control plane components, such
|
||||
|
||||
### Monitor Your Cluster
|
||||
|
||||
Closely monitor and scale your nodes as needed. You should [enable cluster monitoring](../../pages-for-subheaders/cluster-monitoring.md) and use the Prometheus metrics and Grafana visualization options as a starting point.
|
||||
Closely monitor and scale your nodes as needed. You should [enable cluster monitoring](../../explanations/integrations-in-rancher/cluster-monitoring/cluster-monitoring.md) and use the Prometheus metrics and Grafana visualization options as a starting point.
|
||||
|
||||
## Tips for Security
|
||||
|
||||
Below are some basic tips for increasing security in Rancher. For more detailed information about securing your cluster, you can refer to these resources:
|
||||
|
||||
- Rancher's [security documentation and Kubernetes cluster hardening guide](../../pages-for-subheaders/rancher-security.md)
|
||||
- Rancher's [security documentation and Kubernetes cluster hardening guide](../rancher-security/rancher-security.md)
|
||||
- [101 More Security Best Practices for Kubernetes](https://rancher.com/blog/2019/2019-01-17-101-more-kubernetes-security-best-practices/)
|
||||
|
||||
### Update Rancher with Security Patches
|
||||
|
||||
Reference in New Issue
Block a user