Rancher Resolved Issues
      
        
          
          2022-08-21 14:39:09
        
        
              
          
      
      Rancher Problems and Solutions
Quickly Clean a Node
Nodes need to be cleaned completely, use the following script.
| 1 | curl https://gist.githubusercontent.com/Ileriayo/1bef407602208911e86f42d5d208c1fb/raw/af8fa882add9c0a7ccd72b92f1cfab5c95c355ba/nuke_rancher_kube_node.sh | sh | 
Waiting for API [Readey False xxx mins ago [Disconnected] Cluster agent is not connected]
The newest version of rancher brought this error to me, I’m not sure about the cause.
Waiting for API [Readey False xxx mins ago [Disconnected] Cluster agent is not connected].
Solution
- What I used: changed Rancher to 2.5.15(2.5x stable version), choose 19.x Kubernetes
- Another method suggested by others (but not working for me)
Waiting for Kubernetes API to be available
Solution
- Setting up hosts for all nodes. - ```bash
 hostnamectl set-hostname node11 
 2
 3
 4
 5
 6
 7
 8
 - Writing to the `hosts` file for all nodes
 - ```bash
 vi /etc/hosts
 #192.168.2.121 node1
 #192.168.2.122 node2
 #192.168.2.123 node3
 
- ```bash
- Shut down firewall, selinux, and swap - sudo systemctl stop firewalld sudo systemctl disable firewalld #shut selinux: sed -i 's/enforcing/disabled/' /etc/selinux/config setenforce 0 #shut swap: swapoff -a sed -ri 's/.*swap.*/#&/' /etc/fstab
 
Master node unavailable after shutting down a worker node
I encountered this problem when I used only two nodes for the Kubernetes cluster, which is only one master node(with worker installed) and one worker node
Solution
- Having one more worker node. When a worker node is unavailable, after 5 minutes, a new pod will be created on another available working node automatically.
