Promoting ECS Agents to ECS Servers

You must promote ECS Agents to ECS Servers.

After installing the Load Balancer, you must reconfigure the existing ECS Agents to ECS Servers. This process is called Promoting the agents to Servers. You must promote only one agent at a time. This procedure is explained using an example where you promote the ECS agent on agent1.example.com and then promote the ECS agent on agent2.example.com.

  1. Prepare the agent node for promotion by running the following commands on the command line of your ECS Server host. sudo /var/lib/rancher/rke2/bin/kubectl --kubeconfig=/etc/rancher/rke2/rke2.yaml get nodes sudo /var/lib/rancher/rke2/bin/kubectl --kubeconfig=/etc/rancher/rke2/rke2.yaml drain agent1.example.com --ignore-daemonsets --delete-emptydir-data.
  2. In Cloudera Manager, navigate to ECS Cluster >> ECS. Stop the ECSAgent running on agent1 and then delete the agent.
  3. In Cloudera Manager, navigate to ECS Cluster >> ECS. Click Add Role Instances.
  4. Add the available host agent1 as an ECS Server in the Add Role Instances to ECS pop-up. Click Ok.
  5. Click Continue.
  6. Start the new ECS Server from ECS Instances view. For example, start ECSServer on agent1.
  7. On the command line, uncordon the node by running the following command: sudo /var/lib/rancher/rke2/bin/kubectl --kubeconfig=/etc/rancher/rke2/rke2.yaml uncordon agent1.example.com
  8. Confirm the node’s status from webUI or the command line by running the command sudo /var/lib/rancher/rke2/bin/kubectl --kubeconfig=/etc/rancher/rke2/rke2.yaml get nodes.
When agent1 is ready, you can promote the next agent agent2. To promote the next agent, you must perform steps 1-8 again, the example uses agent2.example.com.