1. [rancher@rmaster01 ~]$ kubectl -n cattle-system get pods | grep Evicted | awk '{print $1}' | xargs kubectl -n cattle-system delete pod
    2. pod "rancher-ddd55f7b5-2f9vh" deleted
    3. pod "rancher-ddd55f7b5-464dd" deleted
    4. pod "rancher-ddd55f7b5-5d8vt" deleted
    5. pod "rancher-ddd55f7b5-5mbt9" deleted
    6. pod "rancher-ddd55f7b5-5nmxk" deleted
    7. pod "rancher-ddd55f7b5-6kw8l" deleted
    8. pod "rancher-ddd55f7b5-8228c" deleted
    9. pod "rancher-ddd55f7b5-8m8st" deleted
    10. pod "rancher-ddd55f7b5-8qc6w" deleted
    11. pod "rancher-ddd55f7b5-96r89" deleted
    12. pod "rancher-ddd55f7b5-b226s" deleted
    13. pod "rancher-ddd55f7b5-dmvxf" deleted
    14. pod "rancher-ddd55f7b5-g7gfs" deleted
    15. pod "rancher-ddd55f7b5-gppsv" deleted
    16. pod "rancher-ddd55f7b5-h2gf5" deleted
    17. pod "rancher-ddd55f7b5-hv4tg" deleted
    18. pod "rancher-ddd55f7b5-jwtsh" deleted
    19. pod "rancher-ddd55f7b5-lzmfg" deleted
    20. pod "rancher-ddd55f7b5-m429f" deleted
    21. pod "rancher-ddd55f7b5-m9vkw" deleted
    22. pod "rancher-ddd55f7b5-pm7sx" deleted
    23. pod "rancher-ddd55f7b5-t67ww" deleted
    24. pod "rancher-ddd55f7b5-t8qdl" deleted
    25. pod "rancher-ddd55f7b5-tf4zq" deleted
    26. pod "rancher-ddd55f7b5-w48xt" deleted
    27. pod "rancher-ddd55f7b5-wt5fn" deleted
    28. pod "rancher-ddd55f7b5-xd9cn" deleted
    29. pod "rancher-ddd55f7b5-xjhkg" deleted
    30. pod "rancher-ddd55f7b5-xvd47" deleted
    31. [rancher@rmaster01 ~]$
    1. [rancher@rmaster01 ~]$ kubectl -n cattle-system get pod
    2. NAME READY STATUS RESTARTS AGE
    3. cattle-cluster-agent-86994b5844-q64pc 0/1 CrashLoopBackOff 9 101d
    4. cattle-node-agent-btczr 0/1 CrashLoopBackOff 11 101d
    5. cattle-node-agent-fchtn 0/1 CrashLoopBackOff 8 101d
    6. cattle-node-agent-l9xq4 0/1 CrashLoopBackOff 9 101d
    7. cattle-node-agent-psm6r 0/1 CrashLoopBackOff 13 101d
    8. cattle-node-agent-xffx9 0/1 CrashLoopBackOff 7 101d
    9. rancher-ddd55f7b5-2f22n 1/1 Running 4 101d
    10. rancher-ddd55f7b5-cc7qk 1/1 Running 0 5m22s
    11. rancher-ddd55f7b5-fstlp 1/1 Running 5 101d
    12. [rancher@rmaster01 ~]$
    1. [rancher@rmaster01 ~]$ kubectl get nodes
    2. NAME STATUS ROLES AGE VERSION
    3. node01 Ready worker 101d v1.17.5
    4. node02 Ready worker 101d v1.17.5
    5. rmaster01 Ready controlplane,etcd 101d v1.17.5
    6. rmaster02 Ready controlplane,etcd 101d v1.17.5
    7. rmaster03 Ready controlplane,etcd 101d v1.17.5
    8. [rancher@rmaster01 ~]$ kubectl get cs
    9. NAME STATUS MESSAGE ERROR
    10. scheduler Healthy ok
    11. controller-manager Healthy ok
    12. etcd-1 Healthy {"health":"true"}
    13. etcd-2 Healthy {"health":"true"}
    14. etcd-0 Healthy {"health":"true"}
    15. [rancher@rmaster01 ~]$
    1. [rancher@rmaster01 ~]$ kubectl -n cattle-system describe pod cattle-node-agent-btczr
    2. Name: cattle-node-agent-btczr
    3. Namespace: cattle-system
    4. Priority: 0
    5. Node: node01/192.168.11.103
    6. Start Time: Sun, 07 Jun 2020 07:10:31 +0800
    7. Labels: app=cattle-agent
    8. controller-revision-hash=7bc84ddb5c
    9. pod-template-generation=1
    10. Annotations: <none>
    11. Status: Running
    12. IP: 192.168.11.103
    13. IPs:
    14. IP: 192.168.11.103
    15. Controlled By: DaemonSet/cattle-node-agent
    16. Containers:
    17. agent:
    18. Container ID: docker://60bbd3bd00f17cbae35a5001c66a1d2446a15a5928ded30ff233ec935d4049a8
    19. Image: cnrancher/rancher-agent:v2.3.6-ent
    20. Image ID: docker-pullable://cnrancher/rancher-agent@sha256:bc3cfaad4d5ec3619be29de663bab265613b09206f91061429a40bae8cca2e46
    21. Port: <none>
    22. Host Port: <none>
    23. State: Waiting
    24. Reason: CrashLoopBackOff
    25. Last State: Terminated
    26. Reason: Error
    27. Exit Code: 1
    28. Started: Wed, 16 Sep 2020 10:50:41 +0800
    29. Finished: Wed, 16 Sep 2020 10:50:44 +0800
    30. Ready: False
    31. Restart Count: 11
    32. Environment:
    33. CATTLE_NODE_NAME: (v1:spec.nodeName)
    34. CATTLE_SERVER: https://192.168.11.99
    35. CATTLE_CA_CHECKSUM: 8552b9769db529116c74fe264fcbf2dcc958ccd80691c74e44e3a1be3c346b03
    36. CATTLE_CLUSTER: false
    37. CATTLE_K8S_MANAGED: true
    38. CATTLE_AGENT_CONNECT: true
    39. Mounts:
    40. /cattle-credentials from cattle-credentials (ro)
    41. /etc/docker/certs.d from docker-certs (rw)
    42. /etc/kubernetes from k8s-ssl (rw)
    43. /run from run (rw)
    44. /var/run from var-run (rw)
    45. /var/run/secrets/kubernetes.io/serviceaccount from cattle-token-k2f8j (ro)
    46. Conditions:
    47. Type Status
    48. Initialized True
    49. Ready False
    50. ContainersReady False
    51. PodScheduled True
    52. Volumes:
    53. k8s-ssl:
    54. Type: HostPath (bare host directory volume)
    55. Path: /etc/kubernetes
    56. HostPathType: DirectoryOrCreate
    57. var-run:
    58. Type: HostPath (bare host directory volume)
    59. Path: /var/run
    60. HostPathType: DirectoryOrCreate
    61. run:
    62. Type: HostPath (bare host directory volume)
    63. Path: /run
    64. HostPathType: DirectoryOrCreate
    65. cattle-credentials:
    66. Type: Secret (a volume populated by a Secret)
    67. SecretName: cattle-credentials-23d7231
    68. Optional: false
    69. docker-certs:
    70. Type: HostPath (bare host directory volume)
    71. Path: /etc/docker/certs.d
    72. HostPathType: DirectoryOrCreate
    73. cattle-token-k2f8j:
    74. Type: Secret (a volume populated by a Secret)
    75. SecretName: cattle-token-k2f8j
    76. Optional: false
    77. QoS Class: BestEffort
    78. Node-Selectors: <none>
    79. Tolerations:
    80. node.kubernetes.io/disk-pressure:NoSchedule
    81. node.kubernetes.io/memory-pressure:NoSchedule
    82. node.kubernetes.io/network-unavailable:NoSchedule
    83. node.kubernetes.io/not-ready:NoExecute
    84. node.kubernetes.io/pid-pressure:NoSchedule
    85. node.kubernetes.io/unreachable:NoExecute
    86. node.kubernetes.io/unschedulable:NoSchedule
    87. Events:
    88. Type Reason Age From Message
    89. ---- ------ ---- ---- -------
    90. Normal SandboxChanged 15m kubelet, node01 Pod sandbox changed, it will be killed and re-created.
    91. Normal Pulled 13m (x4 over 15m) kubelet, node01 Container image "cnrancher/rancher-agent:v2.3.6-ent" already present on machine
    92. Normal Created 13m (x4 over 15m) kubelet, node01 Created container agent
    93. Normal Started 13m (x4 over 15m) kubelet, node01 Started container agent
    94. Warning BackOff 4m44s (x46 over 14m) kubelet, node01 Back-off restarting failed container
    95. [rancher@rmaster01 ~]$
    1. [rancher@rmaster01 ~]$ kubectl -n cattle-system describe pod cattle-node-agent-btczr
    2. Name: cattle-node-agent-btczr
    3. Namespace: cattle-system
    4. Priority: 0
    5. Node: node01/192.168.11.103
    6. Start Time: Sun, 07 Jun 2020 07:10:31 +0800
    7. Labels: app=cattle-agent
    8. controller-revision-hash=7bc84ddb5c
    9. pod-template-generation=1
    10. Annotations: <none>
    11. Status: Running
    12. IP: 192.168.11.103
    13. IPs:
    14. IP: 192.168.11.103
    15. Controlled By: DaemonSet/cattle-node-agent
    16. Containers:
    17. agent:
    18. Container ID: docker://60bbd3bd00f17cbae35a5001c66a1d2446a15a5928ded30ff233ec935d4049a8
    19. Image: cnrancher/rancher-agent:v2.3.6-ent
    20. Image ID: docker-pullable://cnrancher/rancher-agent@sha256:bc3cfaad4d5ec3619be29de663bab265613b09206f91061429a40bae8cca2e46
    21. Port: <none>
    22. Host Port: <none>
    23. State: Waiting
    24. Reason: CrashLoopBackOff
    25. Last State: Terminated
    26. Reason: Error
    27. Exit Code: 1
    28. Started: Wed, 16 Sep 2020 10:50:41 +0800
    29. Finished: Wed, 16 Sep 2020 10:50:44 +0800
    30. Ready: False
    31. Restart Count: 11
    32. Environment:
    33. CATTLE_NODE_NAME: (v1:spec.nodeName)
    34. CATTLE_SERVER: https://192.168.11.99
    35. CATTLE_CA_CHECKSUM: 8552b9769db529116c74fe264fcbf2dcc958ccd80691c74e44e3a1be3c346b03
    36. CATTLE_CLUSTER: false
    37. CATTLE_K8S_MANAGED: true
    38. CATTLE_AGENT_CONNECT: true
    39. Mounts:
    40. /cattle-credentials from cattle-credentials (ro)
    41. /etc/docker/certs.d from docker-certs (rw)
    42. /etc/kubernetes from k8s-ssl (rw)
    43. /run from run (rw)
    44. /var/run from var-run (rw)
    45. /var/run/secrets/kubernetes.io/serviceaccount from cattle-token-k2f8j (ro)
    46. Conditions:
    47. Type Status
    48. Initialized True
    49. Ready False
    50. ContainersReady False
    51. PodScheduled True
    52. Volumes:
    53. k8s-ssl:
    54. Type: HostPath (bare host directory volume)
    55. Path: /etc/kubernetes
    56. HostPathType: DirectoryOrCreate
    57. var-run:
    58. Type: HostPath (bare host directory volume)
    59. Path: /var/run
    60. HostPathType: DirectoryOrCreate
    61. run:
    62. Type: HostPath (bare host directory volume)
    63. Path: /run
    64. HostPathType: DirectoryOrCreate
    65. cattle-credentials:
    66. Type: Secret (a volume populated by a Secret)
    67. SecretName: cattle-credentials-23d7231
    68. Optional: false
    69. docker-certs:
    70. Type: HostPath (bare host directory volume)
    71. Path: /etc/docker/certs.d
    72. HostPathType: DirectoryOrCreate
    73. cattle-token-k2f8j:
    74. Type: Secret (a volume populated by a Secret)
    75. SecretName: cattle-token-k2f8j
    76. Optional: false
    77. QoS Class: BestEffort
    78. Node-Selectors: <none>
    79. Tolerations:
    80. node.kubernetes.io/disk-pressure:NoSchedule
    81. node.kubernetes.io/memory-pressure:NoSchedule
    82. node.kubernetes.io/network-unavailable:NoSchedule
    83. node.kubernetes.io/not-ready:NoExecute
    84. node.kubernetes.io/pid-pressure:NoSchedule
    85. node.kubernetes.io/unreachable:NoExecute
    86. node.kubernetes.io/unschedulable:NoSchedule
    87. Events:
    88. Type Reason Age From Message
    89. ---- ------ ---- ---- -------
    90. Normal SandboxChanged 15m kubelet, node01 Pod sandbox changed, it will be killed and re-created.
    91. Normal Pulled 13m (x4 over 15m) kubelet, node01 Container image "cnrancher/rancher-agent:v2.3.6-ent" already present on machine
    92. Normal Created 13m (x4 over 15m) kubelet, node01 Created container agent
    93. Normal Started 13m (x4 over 15m) kubelet, node01 Started container agent
    94. Warning BackOff 4m44s (x46 over 14m) kubelet, node01 Back-off restarting failed container
    95. [rancher@rmaster01 ~]$
    96. [rancher@rmaster01 ~]$ kubectl -n cattle-system get pod
    97. NAME READY STATUS RESTARTS AGE
    98. cattle-cluster-agent-86994b5844-q64pc 0/1 CrashLoopBackOff 10 101d
    99. cattle-node-agent-btczr 0/1 CrashLoopBackOff 11 101d
    100. cattle-node-agent-fchtn 0/1 CrashLoopBackOff 9 101d
    101. cattle-node-agent-l9xq4 0/1 CrashLoopBackOff 10 101d
    102. cattle-node-agent-psm6r 0/1 CrashLoopBackOff 13 101d
    103. cattle-node-agent-xffx9 0/1 CrashLoopBackOff 8 101d
    104. rancher-ddd55f7b5-2f22n 1/1 Running 4 101d
    105. rancher-ddd55f7b5-cc7qk 1/1 Running 0 7m59s
    106. rancher-ddd55f7b5-fstlp 1/1 Running 5 101d
    107. [rancher@rmaster01 ~]$ kubectl -n cattle-system describe pod cattle-cluster-agent-86994b5844-q64pc
    108. Name: cattle-cluster-agent-86994b5844-q64pc
    109. Namespace: cattle-system
    110. Priority: 0
    111. Node: rmaster03/192.168.11.102
    112. Start Time: Sun, 07 Jun 2020 07:10:31 +0800
    113. Labels: app=cattle-cluster-agent
    114. pod-template-hash=86994b5844
    115. Annotations: cni.projectcalico.org/podIP: 10.42.1.4/32
    116. cni.projectcalico.org/podIPs: 10.42.1.4/32
    117. Status: Running
    118. IP: 10.42.1.4
    119. IPs:
    120. IP: 10.42.1.4
    121. Controlled By: ReplicaSet/cattle-cluster-agent-86994b5844
    122. Containers:
    123. cluster-register:
    124. Container ID: docker://9385d83c276099915ecb676938dfe47f989dab64b1ba1d7130416b0f09c41871
    125. Image: cnrancher/rancher-agent:v2.3.6-ent
    126. Image ID: docker-pullable://cnrancher/rancher-agent@sha256:bc3cfaad4d5ec3619be29de663bab265613b09206f91061429a40bae8cca2e46
    127. Port: <none>
    128. Host Port: <none>
    129. State: Waiting
    130. Reason: CrashLoopBackOff
    131. Last State: Terminated
    132. Reason: Error
    133. Exit Code: 1
    134. Started: Wed, 16 Sep 2020 10:54:09 +0800
    135. Finished: Wed, 16 Sep 2020 10:54:13 +0800
    136. Ready: False
    137. Restart Count: 10
    138. Environment:
    139. CATTLE_SERVER: https://192.168.11.99
    140. CATTLE_CA_CHECKSUM: 8552b9769db529116c74fe264fcbf2dcc958ccd80691c74e44e3a1be3c346b03
    141. CATTLE_CLUSTER: true
    142. CATTLE_K8S_MANAGED: true
    143. Mounts:
    144. /cattle-credentials from cattle-credentials (ro)
    145. /var/run/secrets/kubernetes.io/serviceaccount from cattle-token-k2f8j (ro)
    146. Conditions:
    147. Type Status
    148. Initialized True
    149. Ready False
    150. ContainersReady False
    151. PodScheduled True
    152. Volumes:
    153. cattle-credentials:
    154. Type: Secret (a volume populated by a Secret)
    155. SecretName: cattle-credentials-23d7231
    156. Optional: false
    157. cattle-token-k2f8j:
    158. Type: Secret (a volume populated by a Secret)
    159. SecretName: cattle-token-k2f8j
    160. Optional: false
    161. QoS Class: BestEffort
    162. Node-Selectors: <none>
    163. Tolerations:
    164. Events:
    165. Type Reason Age From Message
    166. ---- ------ ---- ---- -------
    167. Normal SandboxChanged 17m kubelet, rmaster03 Pod sandbox changed, it will be killed and re-created.
    168. Normal Pulled 15m (x4 over 17m) kubelet, rmaster03 Container image "cnrancher/rancher-agent:v2.3.6-ent" already present on machine
    169. Normal Created 15m (x4 over 17m) kubelet, rmaster03 Created container cluster-register
    170. Normal Started 15m (x4 over 17m) kubelet, rmaster03 Started container cluster-register
    171. Warning BackOff 2m36s (x68 over 17m) kubelet, rmaster03 Back-off restarting failed container
    172. [rancher@rmaster01 ~]$
    1. [rancher@rmaster01 ~]$ kubectl -n cattle-system get secrets
    2. NAME TYPE DATA AGE
    3. cattle-credentials-23d7231 Opaque 2 101d
    4. cattle-setting-provider Opaque 64 101d
    5. cattle-token-k2f8j kubernetes.io/service-account-token 3 101d
    6. default-token-sjsg6 kubernetes.io/service-account-token 3 101d
    7. rancher-token-ms5cc kubernetes.io/service-account-token 3 101d
    8. sh.helm.release.v1.rancher.v1 helm.sh/release.v1 1 101d
    9. tls-ca Opaque 1 101d
    10. tls-rancher-ingress kubernetes.io/tls 2 101d
    11. [rancher@rmaster01 ~]$
    1. [rancher@rmaster01 ~]$ kubectl -n cattle-system delete pod cattle-node-agent-btczr
    2. pod "cattle-node-agent-btczr" deleted
    3. [rancher@rmaster01 ~]$ kubectl -n cattle-system get pod -w
    4. NAME READY STATUS RESTARTS AGE
    5. cattle-cluster-agent-86994b5844-q64pc 0/1 CrashLoopBackOff 10 101d
    6. cattle-node-agent-fchtn 0/1 CrashLoopBackOff 9 101d
    7. cattle-node-agent-hs2xw 1/1 Running 0 3s
    8. cattle-node-agent-l9xq4 0/1 CrashLoopBackOff 10 101d
    9. cattle-node-agent-psm6r 0/1 CrashLoopBackOff 14 101d
    10. cattle-node-agent-xffx9 0/1 CrashLoopBackOff 8 101d
    11. rancher-ddd55f7b5-2f22n 1/1 Running 4 101d
    12. rancher-ddd55f7b5-cc7qk 1/1 Running 0 10m
    13. rancher-ddd55f7b5-fstlp 1/1 Running 5 101d
    14. cattle-node-agent-hs2xw 0/1 Error 0 4s
    15. cattle-node-agent-hs2xw 1/1 Running 1 5s
    16. cattle-node-agent-hs2xw 0/1 Error 1 7s
    1. [rancher@rmaster01 ~]$ kubectl -n cattle-system describe pod cattle-node-agent-hs2xw
    2. Name: cattle-node-agent-hs2xw
    3. Namespace: cattle-system
    4. Priority: 0
    5. Node: node01/192.168.11.103
    6. Start Time: Wed, 16 Sep 2020 10:57:58 +0800
    7. Labels: app=cattle-agent
    8. controller-revision-hash=7bc84ddb5c
    9. pod-template-generation=1
    10. Annotations: <none>
    11. Status: Running
    12. IP: 192.168.11.103
    13. IPs:
    14. IP: 192.168.11.103
    15. Controlled By: DaemonSet/cattle-node-agent
    16. Containers:
    17. agent:
    18. Container ID: docker://182bfb49c88e802bb6c84b9d983f950ff4f2820c59229b2024a9b7d361270721
    19. Image: cnrancher/rancher-agent:v2.3.6-ent
    20. Image ID: docker-pullable://cnrancher/rancher-agent@sha256:bc3cfaad4d5ec3619be29de663bab265613b09206f91061429a40bae8cca2e46
    21. Port: <none>
    22. Host Port: <none>
    23. State: Waiting
    24. Reason: CrashLoopBackOff
    25. Last State: Terminated
    26. Reason: Error
    27. Exit Code: 1
    28. Started: Wed, 16 Sep 2020 10:58:19 +0800
    29. Finished: Wed, 16 Sep 2020 10:58:22 +0800
    30. Ready: False
    31. Restart Count: 2
    32. Environment:
    33. CATTLE_NODE_NAME: (v1:spec.nodeName)
    34. CATTLE_SERVER: https://192.168.11.99
    35. CATTLE_CA_CHECKSUM: 8552b9769db529116c74fe264fcbf2dcc958ccd80691c74e44e3a1be3c346b03
    36. CATTLE_CLUSTER: false
    37. CATTLE_K8S_MANAGED: true
    38. CATTLE_AGENT_CONNECT: true
    39. Mounts:
    40. /cattle-credentials from cattle-credentials (ro)
    41. /etc/docker/certs.d from docker-certs (rw)
    42. /etc/kubernetes from k8s-ssl (rw)
    43. /run from run (rw)
    44. /var/run from var-run (rw)
    45. /var/run/secrets/kubernetes.io/serviceaccount from cattle-token-k2f8j (ro)
    46. Conditions:
    47. Type Status
    48. Initialized True
    49. Ready False
    50. ContainersReady False
    51. PodScheduled True
    52. Volumes:
    53. k8s-ssl:
    54. Type: HostPath (bare host directory volume)
    55. Path: /etc/kubernetes
    56. HostPathType: DirectoryOrCreate
    57. var-run:
    58. Type: HostPath (bare host directory volume)
    59. Path: /var/run
    60. HostPathType: DirectoryOrCreate
    61. run:
    62. Type: HostPath (bare host directory volume)
    63. Path: /run
    64. HostPathType: DirectoryOrCreate
    65. cattle-credentials:
    66. Type: Secret (a volume populated by a Secret)
    67. SecretName: cattle-credentials-23d7231
    68. Optional: false
    69. docker-certs:
    70. Type: HostPath (bare host directory volume)
    71. Path: /etc/docker/certs.d
    72. HostPathType: DirectoryOrCreate
    73. cattle-token-k2f8j:
    74. Type: Secret (a volume populated by a Secret)
    75. SecretName: cattle-token-k2f8j
    76. Optional: false
    77. QoS Class: BestEffort
    78. Node-Selectors: <none>
    79. Tolerations:
    80. node.kubernetes.io/disk-pressure:NoSchedule
    81. node.kubernetes.io/memory-pressure:NoSchedule
    82. node.kubernetes.io/network-unavailable:NoSchedule
    83. node.kubernetes.io/not-ready:NoExecute
    84. node.kubernetes.io/pid-pressure:NoSchedule
    85. node.kubernetes.io/unreachable:NoExecute
    86. node.kubernetes.io/unschedulable:NoSchedule
    87. Events:
    88. Type Reason Age From Message
    89. ---- ------ ---- ---- -------
    90. Normal Scheduled <unknown> default-scheduler Successfully assigned cattle-system/cattle-node-agent-hs2xw to node01
    91. Warning BackOff 16s (x3 over 43s) kubelet, node01 Back-off restarting failed container
    92. Normal Pulled 2s (x4 over 50s) kubelet, node01 Container image "cnrancher/rancher-agent:v2.3.6-ent" already present on machine
    93. Normal Created 1s (x4 over 50s) kubelet, node01 Created container agent
    94. Normal Started 1s (x4 over 50s) kubelet, node01 Started container agent
    95. [rancher@rmaster01 ~]$
    1. [rancher@rmaster01 ~]$ kubectl -n cattle-system get pod
    2. NAME READY STATUS RESTARTS AGE
    3. cattle-cluster-agent-86994b5844-q64pc 0/1 CrashLoopBackOff 11 101d
    4. cattle-node-agent-fchtn 0/1 CrashLoopBackOff 10 101d
    5. cattle-node-agent-hs2xw 0/1 CrashLoopBackOff 4 118s
    6. cattle-node-agent-l9xq4 0/1 CrashLoopBackOff 11 101d
    7. cattle-node-agent-psm6r 0/1 CrashLoopBackOff 14 101d
    8. cattle-node-agent-xffx9 0/1 CrashLoopBackOff 9 101d
    9. rancher-ddd55f7b5-2f22n 1/1 Running 4 101d
    10. rancher-ddd55f7b5-cc7qk 1/1 Running 0 12m
    11. rancher-ddd55f7b5-fstlp 1/1 Running 5 101d
    12. [rancher@rmaster01 ~]$ kubectl -n cattle-system logs cattle-node-agent-hs2xw
    13. INFO: Environment: CATTLE_ADDRESS=192.168.11.103 CATTLE_AGENT_CONNECT=true CATTLE_CA_CHECKSUM=8552b9769db529116c74fe264fcbf2dcc958ccd80691c74e44e3a1be3c346b03 CATTLE_CLUSTER=false CATTLE_INTERNAL_ADDRESS= CATTLE_K8S_MANAGED=true CATTLE_NODE_NAME=node01 CATTLE_SERVER=https://192.168.11.99
    14. INFO: Using resolv.conf: nameserver 114.114.114.114
    15. ERROR: https://192.168.11.99/ping is not accessible (Failed to connect to 192.168.11.99 port 443: No route to host)
    16. [rancher@rmaster01 ~]$ ping 114.114.114.114
    17. PING 114.114.114.114 (114.114.114.114) 56(84) bytes of data.
    18. 64 bytes from 114.114.114.114: icmp_seq=1 ttl=84 time=12.2 ms
    19. 64 bytes from 114.114.114.114: icmp_seq=2 ttl=77 time=10.5 ms
    20. ^C
    21. --- 114.114.114.114 ping statistics ---
    22. 2 packets transmitted, 2 received, 0% packet loss, time 1001ms
    23. rtt min/avg/max/mdev = 10.537/11.380/12.223/0.843 ms
    24. [rancher@rmaster01 ~]$ ping 192.168.11.99
    25. PING 192.168.11.99 (192.168.11.99) 56(84) bytes of data.
    26. ^C
    27. --- 192.168.11.99 ping statistics ---
    28. 2 packets transmitted, 0 received, 100% packet loss, time 1006ms
    29. [rancher@rmaster01 ~]$

    开启 nginx代理服务器

    1. [rancher@rmaster01 ~]$ kubectl -n cattle-system get pod -w
    2. NAME READY STATUS RESTARTS AGE
    3. cattle-cluster-agent-86994b5844-q64pc 0/1 CrashLoopBackOff 11 101d
    4. cattle-node-agent-fchtn 0/1 CrashLoopBackOff 10 101d
    5. cattle-node-agent-hs2xw 0/1 Error 6 6m2s
    6. cattle-node-agent-l9xq4 0/1 CrashLoopBackOff 11 101d
    7. cattle-node-agent-psm6r 0/1 CrashLoopBackOff 15 101d
    8. cattle-node-agent-xffx9 0/1 CrashLoopBackOff 10 101d
    9. rancher-ddd55f7b5-2f22n 1/1 Running 4 101d
    10. rancher-ddd55f7b5-cc7qk 1/1 Running 0 16m
    11. rancher-ddd55f7b5-fstlp 1/1 Running 5 101d
    12. cattle-node-agent-fchtn 1/1 Running 11 101d
    13. cattle-node-agent-fchtn 0/1 Error 11 101d
    14. cattle-node-agent-hs2xw 0/1 CrashLoopBackOff 6 6m12s
    15. cattle-node-agent-fchtn 0/1 CrashLoopBackOff 11 101d
    16. cattle-cluster-agent-86994b5844-q64pc 1/1 Running 12 101d
    17. cattle-cluster-agent-86994b5844-q64pc 0/1 Error 12 101d
    18. cattle-cluster-agent-86994b5844-q64pc 0/1 CrashLoopBackOff 12 101d
    19. ^C[rancher@rmaster01 ~]$
    1. [rancher@rmaster01 ~]$ kubectl -n cattle-system get pod
    2. NAME READY STATUS RESTARTS AGE
    3. cattle-cluster-agent-86994b5844-q64pc 1/1 Running 13 101d
    4. cattle-node-agent-fchtn 1/1 Running 12 101d
    5. cattle-node-agent-hs2xw 1/1 Running 7 13m
    6. cattle-node-agent-l9xq4 1/1 Running 13 101d
    7. cattle-node-agent-psm6r 0/1 CrashLoopBackOff 16 101d
    8. cattle-node-agent-xffx9 1/1 Running 11 101d
    9. rancher-ddd55f7b5-2f22n 1/1 Running 4 101d
    10. rancher-ddd55f7b5-cc7qk 1/1 Running 0 24m
    11. rancher-ddd55f7b5-fstlp 1/1 Running 5 101d
    12. [rancher@rmaster01 ~]$ kubectl -n cattle-system describe pod cattle-cluster-agent-86994b5844-q64pc
    13. Name: cattle-cluster-agent-86994b5844-q64pc
    14. Namespace: cattle-system
    15. Priority: 0
    16. Node: rmaster03/192.168.11.102
    17. Start Time: Sun, 07 Jun 2020 07:10:31 +0800
    18. Labels: app=cattle-cluster-agent
    19. pod-template-hash=86994b5844
    20. Annotations: cni.projectcalico.org/podIP: 10.42.1.4/32
    21. cni.projectcalico.org/podIPs: 10.42.1.4/32
    22. Status: Running
    23. IP: 10.42.1.4
    24. IPs:
    25. IP: 10.42.1.4
    26. Controlled By: ReplicaSet/cattle-cluster-agent-86994b5844
    27. Containers:
    28. cluster-register:
    29. Container ID: docker://2f63f94a1be8c8cc807b220d63c751962dc490afd8cb96f56fd4a38eda3fcb35
    30. Image: cnrancher/rancher-agent:v2.3.6-ent
    31. Image ID: docker-pullable://cnrancher/rancher-agent@sha256:bc3cfaad4d5ec3619be29de663bab265613b09206f91061429a40bae8cca2e46
    32. Port: <none>
    33. Host Port: <none>
    34. State: Running
    35. Started: Wed, 16 Sep 2020 11:09:26 +0800
    36. Last State: Terminated
    37. Reason: Error
    38. Exit Code: 1
    39. Started: Wed, 16 Sep 2020 11:04:20 +0800
    40. Finished: Wed, 16 Sep 2020 11:04:23 +0800
    41. Ready: True
    42. Restart Count: 13
    43. Environment:
    44. CATTLE_SERVER: https://192.168.11.99
    45. CATTLE_CA_CHECKSUM: 8552b9769db529116c74fe264fcbf2dcc958ccd80691c74e44e3a1be3c346b03
    46. CATTLE_CLUSTER: true
    47. CATTLE_K8S_MANAGED: true
    48. Mounts:
    49. /cattle-credentials from cattle-credentials (ro)
    50. /var/run/secrets/kubernetes.io/serviceaccount from cattle-token-k2f8j (ro)
    51. Conditions:
    52. Type Status
    53. Initialized True
    54. Ready True
    55. ContainersReady True
    56. PodScheduled True
    57. Volumes:
    58. cattle-credentials:
    59. Type: Secret (a volume populated by a Secret)
    60. SecretName: cattle-credentials-23d7231
    61. Optional: false
    62. cattle-token-k2f8j:
    63. Type: Secret (a volume populated by a Secret)
    64. SecretName: cattle-token-k2f8j
    65. Optional: false
    66. QoS Class: BestEffort
    67. Node-Selectors: <none>
    68. Tolerations:
    69. Events:
    70. Type Reason Age From Message
    71. ---- ------ ---- ---- -------
    72. Normal SandboxChanged 34m kubelet, rmaster03 Pod sandbox changed, it will be killed and re-created.
    73. Normal Pulled 32m (x4 over 34m) kubelet, rmaster03 Container image "cnrancher/rancher-agent:v2.3.6-ent" already present on machine
    74. Normal Created 32m (x4 over 34m) kubelet, rmaster03 Created container cluster-register
    75. Normal Started 32m (x4 over 34m) kubelet, rmaster03 Started container cluster-register
    76. Warning BackOff 4m8s (x136 over 34m) kubelet, rmaster03 Back-off restarting failed container
    77. [rancher@rmaster01 ~]$ kubectl -n cattle-system logs cattle-cluster-agent-86994b5844-q64pc
    78. INFO: Environment: CATTLE_ADDRESS=10.42.1.4 CATTLE_CA_CHECKSUM=8552b9769db529116c74fe264fcbf2dcc958ccd80691c74e44e3a1be3c346b03 CATTLE_CLUSTER=true CATTLE_INTERNAL_ADDRESS= CATTLE_K8S_MANAGED=true CATTLE_NODE_NAME=cattle-cluster-agent-86994b5844-q64pc CATTLE_SERVER=https://192.168.11.99
    79. INFO: Using resolv.conf: nameserver 10.43.0.10 search cattle-system.svc.cluster.local svc.cluster.local cluster.local options ndots:5
    80. INFO: https://192.168.11.99/ping is accessible
    81. INFO: Value from https://192.168.11.99/v3/settings/cacerts is an x509 certificate
    82. time="2020-09-16T03:09:27Z" level=info msg="Rancher agent version v2.3.6-ent is starting"
    83. time="2020-09-16T03:09:27Z" level=info msg="Listening on /tmp/log.sock"
    84. time="2020-09-16T03:09:27Z" level=info msg="Connecting to wss://192.168.11.99/v3/connect/register with token rm25b9bsxvcbc7p4rvx65sjc8hnj4hfvd9srn2nl7fkdqlf9h7kwmv"
    85. time="2020-09-16T03:09:27Z" level=info msg="Connecting to proxy" url="wss://192.168.11.99/v3/connect/register"
    86. time="2020-09-16T03:09:27Z" level=info msg="Starting user controllers"
    87. time="2020-09-16T03:09:28Z" level=info msg="Registering namespaceHandler for adding labels "
    88. time="2020-09-16T03:09:28Z" level=info msg="Starting workload controllers"
    89. time="2020-09-16T03:10:41Z" level=error msg="Remotedialer proxy error" error="read tcp 10.42.1.4:56626->192.168.11.99:443: read: connection reset by peer"
    90. time="2020-09-16T03:10:51Z" level=info msg="Connecting to wss://192.168.11.99/v3/connect with token rm25b9bsxvcbc7p4rvx65sjc8hnj4hfvd9srn2nl7fkdqlf9h7kwmv"
    91. time="2020-09-16T03:10:51Z" level=info msg="Connecting to proxy" url="wss://192.168.11.99/v3/connect"
    92. time="2020-09-16T03:10:51Z" level=warning msg="Error while getting agent config: Get https://192.168.11.99/v3/connect/config: read tcp 10.42.1.4:56624->192.168.11.99:443: read: connection reset by peer"
    93. [rancher@rmaster01 ~]$

    开启代理服务器后 agent running 起来了

    1. [rancher@rmaster01 ~]$ kubectl -n cattle-system get pod
    2. NAME READY STATUS RESTARTS AGE
    3. cattle-cluster-agent-86994b5844-q64pc 1/1 Running 13 101d
    4. cattle-node-agent-fchtn 1/1 Running 12 101d
    5. cattle-node-agent-hs2xw 1/1 Running 7 15m
    6. cattle-node-agent-l9xq4 1/1 Running 13 101d
    7. cattle-node-agent-psm6r 1/1 Running 17 101d
    8. cattle-node-agent-xffx9 1/1 Running 11 101d
    9. rancher-ddd55f7b5-2f22n 1/1 Running 4 101d
    10. rancher-ddd55f7b5-cc7qk 1/1 Running 0 25m
    11. rancher-ddd55f7b5-fstlp 1/1 Running 5 101d
    12. [rancher@rmaster01 ~]$

    image.png
    image.png