The Rancher management server can only be run on Kubernetes cluster in an infrastructure provider where Kubernetes is installed using RKE or K3s. Use of Rancher on hosted Kubernetes providers, such as EKS, is not supported.

    For systems without direct internet access, refer to

    Single-node Installation Tip: In a single-node Kubernetes cluster, the Rancher server does not have high availability, which is important for running Rancher in production. However, installing Rancher on a single-node cluster can be useful if you want to save resources by using a single node in the short term, while preserving a high-availability migration path.

    To set up a single-node RKE cluster, configure only one node in the . The single node should have all three roles: etcd, controlplane, and worker.

    In both single-node setups, Rancher can be installed with Helm on the Kubernetes cluster in the same way that it would be installed on any other cluster.

    Installing Kubernetes

    Install a Kubernetes command-line tool.

    Also install RKE, the Rancher Kubernetes Engine, a Kubernetes distribution and command-line tool.

    1. Create the cluster configuration file

    In this section, you will create a Kubernetes cluster configuration file called rancher-cluster.yml. In a later step, when you set up the cluster with an RKE command, it will use this file to install Kubernetes on your nodes.

    If your node has public and internal addresses, it is recommended to set the internal_address: so Kubernetes will use it for intra-cluster communication. Some services like AWS EC2 require setting the internal_address: if you want to use self-referencing security groups or firewalls.

    RKE will need to connect to each node over SSH, and it will look for a private key in the default location of ~/.ssh/id_rsa. If your private key for a certain node is in a different location than the default, you will also need to configure the ssh_key_path option for that node.

    Common RKE Nodes Options

    When finished, it should end with the line: Finished building Kubernetes cluster successfully.

    3. Test Your Cluster

    This section describes how to set up your workspace so that you can interact with this cluster using the kubectl command-line tool.

    Assuming you have installed kubectl, you need to place the kubeconfig file in a location where kubectl can reach it. The kubeconfig file contains the credentials necessary to access your cluster with kubectl.

    Note: If you have used a different file name from rancher-cluster.yml, then the kube config file will be named kube_config_<FILE_NAME>.yml.

    Move this file to $HOME/.kube/config, or if you are working with multiple Kubernetes clusters, set the environmental variable to the path of kube_config_rancher-cluster.yml:

    Test your connectivity with kubectl and see if all your nodes are in Ready state:

    Check that all the required pods and containers are healthy are ready to continue.

    • Pods are in Running or Completed state.
    • Pods with STATUS Completed are run-once Jobs. For these pods READY should be 0/1.

    This confirms that you have successfully installed a Kubernetes cluster that the Rancher server will run on.

    5. Save Your Files

    Save a copy of the following files in a secure location:

    • rancher-cluster.yml: The RKE cluster configuration file.
    • kube_config_rancher-cluster.yml: The Kubeconfig file for the cluster, this file contains credentials for full access to the cluster.
    • : The , this file contains credentials for full access to the cluster.

      The Kubernetes Cluster State file is only created when using RKE v0.2.0 or higher.

    See the Troubleshooting page.

    Next: Install Rancher