Hfengyun is an official AWS service tier partner focused on providing customers with discounted AWS billing and a range of technical support.
©2024, hfengyun. AWS Discounted Billing | AWS Partner Network
This section will show you how to use Rancher to install an RKE Kubernetes cluster on Amazon EC2.
This section will show you how to use Rancher to install an RKE Kubernetes cluster on Amazon EC2.
First, create EC2 cloud credentials in Rancher. Then, using the cloud credentials, create a node template that Rancher will use to set up additional nodes in EC2.
You will next use Rancher to construct an EC2 cluster and define node pools as you configure it. Each node pool will have a specific Kubernetes role, such as etcd, control plane, or worker. Rancher will install RKE Kubernetes on the new nodes and configure each node with the Kubernetes role assigned to the node pool.
The processes for creating a cluster vary depending on the Rancher version.
RKE
1. Create Cloud Credentials.
2. Create a node template containing cloud credentials and EC2 information.
3. Create a cluster with node pools using node templates.
RKE2
You have successfully created cloud credentials for provisioning nodes in a cluster. You can use these credentials in other node templates or clusters.
Creating an EC2 node template enables Rancher to configure new EC2 nodes. Node templates can be reused in several clusters.
Add one or more node pools to the cluster. For more information about node pools, see this section.
1. Click => Cluster Management.
2 . On the Clusters page, click Create.
3. Click Amazon EC2.
4. Create a node pool for each Kubernetes role. Select a node template that you created for each node pool. For more information about node pools, including best practices for assigning Kubernetes roles to node pools, see this section.
5. Click Add Members to add users that can access the cluster. Use the Roles drop-down menu to set permissions for each user.
6. Use the Cluster Options to select the version of Kubernetes you want to install, the network provider you want to use, and whether you want to enable project network isolation. See “Selecting a Cloud Provider” to configure the Kubernetes cloud provider. For help configuring clusters, see the RKE Cluster Configuration Reference.
7. Click Create.
The active cluster has been assigned to two projects:
The system contains the namespaces cattle-system, ingress-nginx, kube-public, and kube-system.
Desirable next steps.
After you’ve created a cluster, you can access it using the Rancher UI. As a recommended practice, we recommend configuring these alternative methods of accessing the cluster:
Accessing the cluster with the kubectl CLI: Follow these instructions to connect to the cluster via kubectl on your workstation. In this situation, you will authenticate using the Rancher server’s authentication agent, after which Rancher will connect you to the downstream cluster. This allows you to control the cluster without using the Rancher UI.
To access the cluster using the kubectl CLI, use an authorized cluster endpoint. Follow these steps to access the cluster directly using kubectl without first authenticating with Rancher. We recommend enabling this alternative method of accessing the cluster so that you can continue to use it even if Rancher is unavailable.
6 RAFFLES QUAY
Singapore
+65 80951058
sign230203@gmail.com
©2024, hfengyun. AWS Discounted Billing | AWS Partner Network