[rancher@rmaster01 ~]$ kubectl -n cattle-system get pods | grep Evicted | awk '{print $1}' | xargs kubectl -n cattle-system delete podpod "rancher-ddd55f7b5-2f9vh" deletedpod "rancher-ddd55f7b5-464dd" deletedpod "rancher-ddd55f7b5-5d8vt" deletedpod "rancher-ddd55f7b5-5mbt9" deletedpod "rancher-ddd55f7b5-5nmxk" deletedpod "rancher-ddd55f7b5-6kw8l" deletedpod "rancher-ddd55f7b5-8228c" deletedpod "rancher-ddd55f7b5-8m8st" deletedpod "rancher-ddd55f7b5-8qc6w" deletedpod "rancher-ddd55f7b5-96r89" deletedpod "rancher-ddd55f7b5-b226s" deletedpod "rancher-ddd55f7b5-dmvxf" deletedpod "rancher-ddd55f7b5-g7gfs" deletedpod "rancher-ddd55f7b5-gppsv" deletedpod "rancher-ddd55f7b5-h2gf5" deletedpod "rancher-ddd55f7b5-hv4tg" deletedpod "rancher-ddd55f7b5-jwtsh" deletedpod "rancher-ddd55f7b5-lzmfg" deletedpod "rancher-ddd55f7b5-m429f" deletedpod "rancher-ddd55f7b5-m9vkw" deletedpod "rancher-ddd55f7b5-pm7sx" deletedpod "rancher-ddd55f7b5-t67ww" deletedpod "rancher-ddd55f7b5-t8qdl" deletedpod "rancher-ddd55f7b5-tf4zq" deletedpod "rancher-ddd55f7b5-w48xt" deletedpod "rancher-ddd55f7b5-wt5fn" deletedpod "rancher-ddd55f7b5-xd9cn" deletedpod "rancher-ddd55f7b5-xjhkg" deletedpod "rancher-ddd55f7b5-xvd47" deleted[rancher@rmaster01 ~]$
[rancher@rmaster01 ~]$ kubectl -n cattle-system get podNAME READY STATUS RESTARTS AGEcattle-cluster-agent-86994b5844-q64pc 0/1 CrashLoopBackOff 9 101dcattle-node-agent-btczr 0/1 CrashLoopBackOff 11 101dcattle-node-agent-fchtn 0/1 CrashLoopBackOff 8 101dcattle-node-agent-l9xq4 0/1 CrashLoopBackOff 9 101dcattle-node-agent-psm6r 0/1 CrashLoopBackOff 13 101dcattle-node-agent-xffx9 0/1 CrashLoopBackOff 7 101drancher-ddd55f7b5-2f22n 1/1 Running 4 101drancher-ddd55f7b5-cc7qk 1/1 Running 0 5m22srancher-ddd55f7b5-fstlp 1/1 Running 5 101d[rancher@rmaster01 ~]$
[rancher@rmaster01 ~]$ kubectl get nodesNAME STATUS ROLES AGE VERSIONnode01 Ready worker 101d v1.17.5node02 Ready worker 101d v1.17.5rmaster01 Ready controlplane,etcd 101d v1.17.5rmaster02 Ready controlplane,etcd 101d v1.17.5rmaster03 Ready controlplane,etcd 101d v1.17.5[rancher@rmaster01 ~]$ kubectl get csNAME STATUS MESSAGE ERRORscheduler Healthy okcontroller-manager Healthy oketcd-1 Healthy {"health":"true"}etcd-2 Healthy {"health":"true"}etcd-0 Healthy {"health":"true"}[rancher@rmaster01 ~]$
[rancher@rmaster01 ~]$ kubectl -n cattle-system describe pod cattle-node-agent-btczrName: cattle-node-agent-btczrNamespace: cattle-systemPriority: 0Node: node01/192.168.11.103Start Time: Sun, 07 Jun 2020 07:10:31 +0800Labels: app=cattle-agentcontroller-revision-hash=7bc84ddb5cpod-template-generation=1Annotations: <none>Status: RunningIP: 192.168.11.103IPs:IP: 192.168.11.103Controlled By: DaemonSet/cattle-node-agentContainers:agent:Container ID: docker://60bbd3bd00f17cbae35a5001c66a1d2446a15a5928ded30ff233ec935d4049a8Image: cnrancher/rancher-agent:v2.3.6-entImage ID: docker-pullable://cnrancher/rancher-agent@sha256:bc3cfaad4d5ec3619be29de663bab265613b09206f91061429a40bae8cca2e46Port: <none>Host Port: <none>State: WaitingReason: CrashLoopBackOffLast State: TerminatedReason: ErrorExit Code: 1Started: Wed, 16 Sep 2020 10:50:41 +0800Finished: Wed, 16 Sep 2020 10:50:44 +0800Ready: FalseRestart Count: 11Environment:CATTLE_NODE_NAME: (v1:spec.nodeName)CATTLE_SERVER: https://192.168.11.99CATTLE_CA_CHECKSUM: 8552b9769db529116c74fe264fcbf2dcc958ccd80691c74e44e3a1be3c346b03CATTLE_CLUSTER: falseCATTLE_K8S_MANAGED: trueCATTLE_AGENT_CONNECT: trueMounts:/cattle-credentials from cattle-credentials (ro)/etc/docker/certs.d from docker-certs (rw)/etc/kubernetes from k8s-ssl (rw)/run from run (rw)/var/run from var-run (rw)/var/run/secrets/kubernetes.io/serviceaccount from cattle-token-k2f8j (ro)Conditions:Type StatusInitialized TrueReady FalseContainersReady FalsePodScheduled TrueVolumes:k8s-ssl:Type: HostPath (bare host directory volume)Path: /etc/kubernetesHostPathType: DirectoryOrCreatevar-run:Type: HostPath (bare host directory volume)Path: /var/runHostPathType: DirectoryOrCreaterun:Type: HostPath (bare host directory volume)Path: /runHostPathType: DirectoryOrCreatecattle-credentials:Type: Secret (a volume populated by a Secret)SecretName: cattle-credentials-23d7231Optional: falsedocker-certs:Type: HostPath (bare host directory volume)Path: /etc/docker/certs.dHostPathType: DirectoryOrCreatecattle-token-k2f8j:Type: Secret (a volume populated by a Secret)SecretName: cattle-token-k2f8jOptional: falseQoS Class: BestEffortNode-Selectors: <none>Tolerations:node.kubernetes.io/disk-pressure:NoSchedulenode.kubernetes.io/memory-pressure:NoSchedulenode.kubernetes.io/network-unavailable:NoSchedulenode.kubernetes.io/not-ready:NoExecutenode.kubernetes.io/pid-pressure:NoSchedulenode.kubernetes.io/unreachable:NoExecutenode.kubernetes.io/unschedulable:NoScheduleEvents:Type Reason Age From Message---- ------ ---- ---- -------Normal SandboxChanged 15m kubelet, node01 Pod sandbox changed, it will be killed and re-created.Normal Pulled 13m (x4 over 15m) kubelet, node01 Container image "cnrancher/rancher-agent:v2.3.6-ent" already present on machineNormal Created 13m (x4 over 15m) kubelet, node01 Created container agentNormal Started 13m (x4 over 15m) kubelet, node01 Started container agentWarning BackOff 4m44s (x46 over 14m) kubelet, node01 Back-off restarting failed container[rancher@rmaster01 ~]$
[rancher@rmaster01 ~]$ kubectl -n cattle-system describe pod cattle-node-agent-btczrName: cattle-node-agent-btczrNamespace: cattle-systemPriority: 0Node: node01/192.168.11.103Start Time: Sun, 07 Jun 2020 07:10:31 +0800Labels: app=cattle-agentcontroller-revision-hash=7bc84ddb5cpod-template-generation=1Annotations: <none>Status: RunningIP: 192.168.11.103IPs:IP: 192.168.11.103Controlled By: DaemonSet/cattle-node-agentContainers:agent:Container ID: docker://60bbd3bd00f17cbae35a5001c66a1d2446a15a5928ded30ff233ec935d4049a8Image: cnrancher/rancher-agent:v2.3.6-entImage ID: docker-pullable://cnrancher/rancher-agent@sha256:bc3cfaad4d5ec3619be29de663bab265613b09206f91061429a40bae8cca2e46Port: <none>Host Port: <none>State: WaitingReason: CrashLoopBackOffLast State: TerminatedReason: ErrorExit Code: 1Started: Wed, 16 Sep 2020 10:50:41 +0800Finished: Wed, 16 Sep 2020 10:50:44 +0800Ready: FalseRestart Count: 11Environment:CATTLE_NODE_NAME: (v1:spec.nodeName)CATTLE_SERVER: https://192.168.11.99CATTLE_CA_CHECKSUM: 8552b9769db529116c74fe264fcbf2dcc958ccd80691c74e44e3a1be3c346b03CATTLE_CLUSTER: falseCATTLE_K8S_MANAGED: trueCATTLE_AGENT_CONNECT: trueMounts:/cattle-credentials from cattle-credentials (ro)/etc/docker/certs.d from docker-certs (rw)/etc/kubernetes from k8s-ssl (rw)/run from run (rw)/var/run from var-run (rw)/var/run/secrets/kubernetes.io/serviceaccount from cattle-token-k2f8j (ro)Conditions:Type StatusInitialized TrueReady FalseContainersReady FalsePodScheduled TrueVolumes:k8s-ssl:Type: HostPath (bare host directory volume)Path: /etc/kubernetesHostPathType: DirectoryOrCreatevar-run:Type: HostPath (bare host directory volume)Path: /var/runHostPathType: DirectoryOrCreaterun:Type: HostPath (bare host directory volume)Path: /runHostPathType: DirectoryOrCreatecattle-credentials:Type: Secret (a volume populated by a Secret)SecretName: cattle-credentials-23d7231Optional: falsedocker-certs:Type: HostPath (bare host directory volume)Path: /etc/docker/certs.dHostPathType: DirectoryOrCreatecattle-token-k2f8j:Type: Secret (a volume populated by a Secret)SecretName: cattle-token-k2f8jOptional: falseQoS Class: BestEffortNode-Selectors: <none>Tolerations:node.kubernetes.io/disk-pressure:NoSchedulenode.kubernetes.io/memory-pressure:NoSchedulenode.kubernetes.io/network-unavailable:NoSchedulenode.kubernetes.io/not-ready:NoExecutenode.kubernetes.io/pid-pressure:NoSchedulenode.kubernetes.io/unreachable:NoExecutenode.kubernetes.io/unschedulable:NoScheduleEvents:Type Reason Age From Message---- ------ ---- ---- -------Normal SandboxChanged 15m kubelet, node01 Pod sandbox changed, it will be killed and re-created.Normal Pulled 13m (x4 over 15m) kubelet, node01 Container image "cnrancher/rancher-agent:v2.3.6-ent" already present on machineNormal Created 13m (x4 over 15m) kubelet, node01 Created container agentNormal Started 13m (x4 over 15m) kubelet, node01 Started container agentWarning BackOff 4m44s (x46 over 14m) kubelet, node01 Back-off restarting failed container[rancher@rmaster01 ~]$[rancher@rmaster01 ~]$ kubectl -n cattle-system get podNAME READY STATUS RESTARTS AGEcattle-cluster-agent-86994b5844-q64pc 0/1 CrashLoopBackOff 10 101dcattle-node-agent-btczr 0/1 CrashLoopBackOff 11 101dcattle-node-agent-fchtn 0/1 CrashLoopBackOff 9 101dcattle-node-agent-l9xq4 0/1 CrashLoopBackOff 10 101dcattle-node-agent-psm6r 0/1 CrashLoopBackOff 13 101dcattle-node-agent-xffx9 0/1 CrashLoopBackOff 8 101drancher-ddd55f7b5-2f22n 1/1 Running 4 101drancher-ddd55f7b5-cc7qk 1/1 Running 0 7m59srancher-ddd55f7b5-fstlp 1/1 Running 5 101d[rancher@rmaster01 ~]$ kubectl -n cattle-system describe pod cattle-cluster-agent-86994b5844-q64pcName: cattle-cluster-agent-86994b5844-q64pcNamespace: cattle-systemPriority: 0Node: rmaster03/192.168.11.102Start Time: Sun, 07 Jun 2020 07:10:31 +0800Labels: app=cattle-cluster-agentpod-template-hash=86994b5844Annotations: cni.projectcalico.org/podIP: 10.42.1.4/32cni.projectcalico.org/podIPs: 10.42.1.4/32Status: RunningIP: 10.42.1.4IPs:IP: 10.42.1.4Controlled By: ReplicaSet/cattle-cluster-agent-86994b5844Containers:cluster-register:Container ID: docker://9385d83c276099915ecb676938dfe47f989dab64b1ba1d7130416b0f09c41871Image: cnrancher/rancher-agent:v2.3.6-entImage ID: docker-pullable://cnrancher/rancher-agent@sha256:bc3cfaad4d5ec3619be29de663bab265613b09206f91061429a40bae8cca2e46Port: <none>Host Port: <none>State: WaitingReason: CrashLoopBackOffLast State: TerminatedReason: ErrorExit Code: 1Started: Wed, 16 Sep 2020 10:54:09 +0800Finished: Wed, 16 Sep 2020 10:54:13 +0800Ready: FalseRestart Count: 10Environment:CATTLE_SERVER: https://192.168.11.99CATTLE_CA_CHECKSUM: 8552b9769db529116c74fe264fcbf2dcc958ccd80691c74e44e3a1be3c346b03CATTLE_CLUSTER: trueCATTLE_K8S_MANAGED: trueMounts:/cattle-credentials from cattle-credentials (ro)/var/run/secrets/kubernetes.io/serviceaccount from cattle-token-k2f8j (ro)Conditions:Type StatusInitialized TrueReady FalseContainersReady FalsePodScheduled TrueVolumes:cattle-credentials:Type: Secret (a volume populated by a Secret)SecretName: cattle-credentials-23d7231Optional: falsecattle-token-k2f8j:Type: Secret (a volume populated by a Secret)SecretName: cattle-token-k2f8jOptional: falseQoS Class: BestEffortNode-Selectors: <none>Tolerations:Events:Type Reason Age From Message---- ------ ---- ---- -------Normal SandboxChanged 17m kubelet, rmaster03 Pod sandbox changed, it will be killed and re-created.Normal Pulled 15m (x4 over 17m) kubelet, rmaster03 Container image "cnrancher/rancher-agent:v2.3.6-ent" already present on machineNormal Created 15m (x4 over 17m) kubelet, rmaster03 Created container cluster-registerNormal Started 15m (x4 over 17m) kubelet, rmaster03 Started container cluster-registerWarning BackOff 2m36s (x68 over 17m) kubelet, rmaster03 Back-off restarting failed container[rancher@rmaster01 ~]$
[rancher@rmaster01 ~]$ kubectl -n cattle-system get secretsNAME TYPE DATA AGEcattle-credentials-23d7231 Opaque 2 101dcattle-setting-provider Opaque 64 101dcattle-token-k2f8j kubernetes.io/service-account-token 3 101ddefault-token-sjsg6 kubernetes.io/service-account-token 3 101drancher-token-ms5cc kubernetes.io/service-account-token 3 101dsh.helm.release.v1.rancher.v1 helm.sh/release.v1 1 101dtls-ca Opaque 1 101dtls-rancher-ingress kubernetes.io/tls 2 101d[rancher@rmaster01 ~]$
[rancher@rmaster01 ~]$ kubectl -n cattle-system delete pod cattle-node-agent-btczrpod "cattle-node-agent-btczr" deleted[rancher@rmaster01 ~]$ kubectl -n cattle-system get pod -wNAME READY STATUS RESTARTS AGEcattle-cluster-agent-86994b5844-q64pc 0/1 CrashLoopBackOff 10 101dcattle-node-agent-fchtn 0/1 CrashLoopBackOff 9 101dcattle-node-agent-hs2xw 1/1 Running 0 3scattle-node-agent-l9xq4 0/1 CrashLoopBackOff 10 101dcattle-node-agent-psm6r 0/1 CrashLoopBackOff 14 101dcattle-node-agent-xffx9 0/1 CrashLoopBackOff 8 101drancher-ddd55f7b5-2f22n 1/1 Running 4 101drancher-ddd55f7b5-cc7qk 1/1 Running 0 10mrancher-ddd55f7b5-fstlp 1/1 Running 5 101dcattle-node-agent-hs2xw 0/1 Error 0 4scattle-node-agent-hs2xw 1/1 Running 1 5scattle-node-agent-hs2xw 0/1 Error 1 7s
[rancher@rmaster01 ~]$ kubectl -n cattle-system describe pod cattle-node-agent-hs2xwName: cattle-node-agent-hs2xwNamespace: cattle-systemPriority: 0Node: node01/192.168.11.103Start Time: Wed, 16 Sep 2020 10:57:58 +0800Labels: app=cattle-agentcontroller-revision-hash=7bc84ddb5cpod-template-generation=1Annotations: <none>Status: RunningIP: 192.168.11.103IPs:IP: 192.168.11.103Controlled By: DaemonSet/cattle-node-agentContainers:agent:Container ID: docker://182bfb49c88e802bb6c84b9d983f950ff4f2820c59229b2024a9b7d361270721Image: cnrancher/rancher-agent:v2.3.6-entImage ID: docker-pullable://cnrancher/rancher-agent@sha256:bc3cfaad4d5ec3619be29de663bab265613b09206f91061429a40bae8cca2e46Port: <none>Host Port: <none>State: WaitingReason: CrashLoopBackOffLast State: TerminatedReason: ErrorExit Code: 1Started: Wed, 16 Sep 2020 10:58:19 +0800Finished: Wed, 16 Sep 2020 10:58:22 +0800Ready: FalseRestart Count: 2Environment:CATTLE_NODE_NAME: (v1:spec.nodeName)CATTLE_SERVER: https://192.168.11.99CATTLE_CA_CHECKSUM: 8552b9769db529116c74fe264fcbf2dcc958ccd80691c74e44e3a1be3c346b03CATTLE_CLUSTER: falseCATTLE_K8S_MANAGED: trueCATTLE_AGENT_CONNECT: trueMounts:/cattle-credentials from cattle-credentials (ro)/etc/docker/certs.d from docker-certs (rw)/etc/kubernetes from k8s-ssl (rw)/run from run (rw)/var/run from var-run (rw)/var/run/secrets/kubernetes.io/serviceaccount from cattle-token-k2f8j (ro)Conditions:Type StatusInitialized TrueReady FalseContainersReady FalsePodScheduled TrueVolumes:k8s-ssl:Type: HostPath (bare host directory volume)Path: /etc/kubernetesHostPathType: DirectoryOrCreatevar-run:Type: HostPath (bare host directory volume)Path: /var/runHostPathType: DirectoryOrCreaterun:Type: HostPath (bare host directory volume)Path: /runHostPathType: DirectoryOrCreatecattle-credentials:Type: Secret (a volume populated by a Secret)SecretName: cattle-credentials-23d7231Optional: falsedocker-certs:Type: HostPath (bare host directory volume)Path: /etc/docker/certs.dHostPathType: DirectoryOrCreatecattle-token-k2f8j:Type: Secret (a volume populated by a Secret)SecretName: cattle-token-k2f8jOptional: falseQoS Class: BestEffortNode-Selectors: <none>Tolerations:node.kubernetes.io/disk-pressure:NoSchedulenode.kubernetes.io/memory-pressure:NoSchedulenode.kubernetes.io/network-unavailable:NoSchedulenode.kubernetes.io/not-ready:NoExecutenode.kubernetes.io/pid-pressure:NoSchedulenode.kubernetes.io/unreachable:NoExecutenode.kubernetes.io/unschedulable:NoScheduleEvents:Type Reason Age From Message---- ------ ---- ---- -------Normal Scheduled <unknown> default-scheduler Successfully assigned cattle-system/cattle-node-agent-hs2xw to node01Warning BackOff 16s (x3 over 43s) kubelet, node01 Back-off restarting failed containerNormal Pulled 2s (x4 over 50s) kubelet, node01 Container image "cnrancher/rancher-agent:v2.3.6-ent" already present on machineNormal Created 1s (x4 over 50s) kubelet, node01 Created container agentNormal Started 1s (x4 over 50s) kubelet, node01 Started container agent[rancher@rmaster01 ~]$
[rancher@rmaster01 ~]$ kubectl -n cattle-system get podNAME READY STATUS RESTARTS AGEcattle-cluster-agent-86994b5844-q64pc 0/1 CrashLoopBackOff 11 101dcattle-node-agent-fchtn 0/1 CrashLoopBackOff 10 101dcattle-node-agent-hs2xw 0/1 CrashLoopBackOff 4 118scattle-node-agent-l9xq4 0/1 CrashLoopBackOff 11 101dcattle-node-agent-psm6r 0/1 CrashLoopBackOff 14 101dcattle-node-agent-xffx9 0/1 CrashLoopBackOff 9 101drancher-ddd55f7b5-2f22n 1/1 Running 4 101drancher-ddd55f7b5-cc7qk 1/1 Running 0 12mrancher-ddd55f7b5-fstlp 1/1 Running 5 101d[rancher@rmaster01 ~]$ kubectl -n cattle-system logs cattle-node-agent-hs2xwINFO: 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.99INFO: Using resolv.conf: nameserver 114.114.114.114ERROR: https://192.168.11.99/ping is not accessible (Failed to connect to 192.168.11.99 port 443: No route to host)[rancher@rmaster01 ~]$ ping 114.114.114.114PING 114.114.114.114 (114.114.114.114) 56(84) bytes of data.64 bytes from 114.114.114.114: icmp_seq=1 ttl=84 time=12.2 ms64 bytes from 114.114.114.114: icmp_seq=2 ttl=77 time=10.5 ms^C--- 114.114.114.114 ping statistics ---2 packets transmitted, 2 received, 0% packet loss, time 1001msrtt min/avg/max/mdev = 10.537/11.380/12.223/0.843 ms[rancher@rmaster01 ~]$ ping 192.168.11.99PING 192.168.11.99 (192.168.11.99) 56(84) bytes of data.^C--- 192.168.11.99 ping statistics ---2 packets transmitted, 0 received, 100% packet loss, time 1006ms[rancher@rmaster01 ~]$
开启 nginx代理服务器
[rancher@rmaster01 ~]$ kubectl -n cattle-system get pod -wNAME READY STATUS RESTARTS AGEcattle-cluster-agent-86994b5844-q64pc 0/1 CrashLoopBackOff 11 101dcattle-node-agent-fchtn 0/1 CrashLoopBackOff 10 101dcattle-node-agent-hs2xw 0/1 Error 6 6m2scattle-node-agent-l9xq4 0/1 CrashLoopBackOff 11 101dcattle-node-agent-psm6r 0/1 CrashLoopBackOff 15 101dcattle-node-agent-xffx9 0/1 CrashLoopBackOff 10 101drancher-ddd55f7b5-2f22n 1/1 Running 4 101drancher-ddd55f7b5-cc7qk 1/1 Running 0 16mrancher-ddd55f7b5-fstlp 1/1 Running 5 101dcattle-node-agent-fchtn 1/1 Running 11 101dcattle-node-agent-fchtn 0/1 Error 11 101dcattle-node-agent-hs2xw 0/1 CrashLoopBackOff 6 6m12scattle-node-agent-fchtn 0/1 CrashLoopBackOff 11 101dcattle-cluster-agent-86994b5844-q64pc 1/1 Running 12 101dcattle-cluster-agent-86994b5844-q64pc 0/1 Error 12 101dcattle-cluster-agent-86994b5844-q64pc 0/1 CrashLoopBackOff 12 101d^C[rancher@rmaster01 ~]$
[rancher@rmaster01 ~]$ kubectl -n cattle-system get podNAME READY STATUS RESTARTS AGEcattle-cluster-agent-86994b5844-q64pc 1/1 Running 13 101dcattle-node-agent-fchtn 1/1 Running 12 101dcattle-node-agent-hs2xw 1/1 Running 7 13mcattle-node-agent-l9xq4 1/1 Running 13 101dcattle-node-agent-psm6r 0/1 CrashLoopBackOff 16 101dcattle-node-agent-xffx9 1/1 Running 11 101drancher-ddd55f7b5-2f22n 1/1 Running 4 101drancher-ddd55f7b5-cc7qk 1/1 Running 0 24mrancher-ddd55f7b5-fstlp 1/1 Running 5 101d[rancher@rmaster01 ~]$ kubectl -n cattle-system describe pod cattle-cluster-agent-86994b5844-q64pcName: cattle-cluster-agent-86994b5844-q64pcNamespace: cattle-systemPriority: 0Node: rmaster03/192.168.11.102Start Time: Sun, 07 Jun 2020 07:10:31 +0800Labels: app=cattle-cluster-agentpod-template-hash=86994b5844Annotations: cni.projectcalico.org/podIP: 10.42.1.4/32cni.projectcalico.org/podIPs: 10.42.1.4/32Status: RunningIP: 10.42.1.4IPs:IP: 10.42.1.4Controlled By: ReplicaSet/cattle-cluster-agent-86994b5844Containers:cluster-register:Container ID: docker://2f63f94a1be8c8cc807b220d63c751962dc490afd8cb96f56fd4a38eda3fcb35Image: cnrancher/rancher-agent:v2.3.6-entImage ID: docker-pullable://cnrancher/rancher-agent@sha256:bc3cfaad4d5ec3619be29de663bab265613b09206f91061429a40bae8cca2e46Port: <none>Host Port: <none>State: RunningStarted: Wed, 16 Sep 2020 11:09:26 +0800Last State: TerminatedReason: ErrorExit Code: 1Started: Wed, 16 Sep 2020 11:04:20 +0800Finished: Wed, 16 Sep 2020 11:04:23 +0800Ready: TrueRestart Count: 13Environment:CATTLE_SERVER: https://192.168.11.99CATTLE_CA_CHECKSUM: 8552b9769db529116c74fe264fcbf2dcc958ccd80691c74e44e3a1be3c346b03CATTLE_CLUSTER: trueCATTLE_K8S_MANAGED: trueMounts:/cattle-credentials from cattle-credentials (ro)/var/run/secrets/kubernetes.io/serviceaccount from cattle-token-k2f8j (ro)Conditions:Type StatusInitialized TrueReady TrueContainersReady TruePodScheduled TrueVolumes:cattle-credentials:Type: Secret (a volume populated by a Secret)SecretName: cattle-credentials-23d7231Optional: falsecattle-token-k2f8j:Type: Secret (a volume populated by a Secret)SecretName: cattle-token-k2f8jOptional: falseQoS Class: BestEffortNode-Selectors: <none>Tolerations:Events:Type Reason Age From Message---- ------ ---- ---- -------Normal SandboxChanged 34m kubelet, rmaster03 Pod sandbox changed, it will be killed and re-created.Normal Pulled 32m (x4 over 34m) kubelet, rmaster03 Container image "cnrancher/rancher-agent:v2.3.6-ent" already present on machineNormal Created 32m (x4 over 34m) kubelet, rmaster03 Created container cluster-registerNormal Started 32m (x4 over 34m) kubelet, rmaster03 Started container cluster-registerWarning BackOff 4m8s (x136 over 34m) kubelet, rmaster03 Back-off restarting failed container[rancher@rmaster01 ~]$ kubectl -n cattle-system logs cattle-cluster-agent-86994b5844-q64pcINFO: 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.99INFO: Using resolv.conf: nameserver 10.43.0.10 search cattle-system.svc.cluster.local svc.cluster.local cluster.local options ndots:5INFO: https://192.168.11.99/ping is accessibleINFO: Value from https://192.168.11.99/v3/settings/cacerts is an x509 certificatetime="2020-09-16T03:09:27Z" level=info msg="Rancher agent version v2.3.6-ent is starting"time="2020-09-16T03:09:27Z" level=info msg="Listening on /tmp/log.sock"time="2020-09-16T03:09:27Z" level=info msg="Connecting to wss://192.168.11.99/v3/connect/register with token rm25b9bsxvcbc7p4rvx65sjc8hnj4hfvd9srn2nl7fkdqlf9h7kwmv"time="2020-09-16T03:09:27Z" level=info msg="Connecting to proxy" url="wss://192.168.11.99/v3/connect/register"time="2020-09-16T03:09:27Z" level=info msg="Starting user controllers"time="2020-09-16T03:09:28Z" level=info msg="Registering namespaceHandler for adding labels "time="2020-09-16T03:09:28Z" level=info msg="Starting workload controllers"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"time="2020-09-16T03:10:51Z" level=info msg="Connecting to wss://192.168.11.99/v3/connect with token rm25b9bsxvcbc7p4rvx65sjc8hnj4hfvd9srn2nl7fkdqlf9h7kwmv"time="2020-09-16T03:10:51Z" level=info msg="Connecting to proxy" url="wss://192.168.11.99/v3/connect"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"[rancher@rmaster01 ~]$
开启代理服务器后 agent running 起来了
[rancher@rmaster01 ~]$ kubectl -n cattle-system get podNAME READY STATUS RESTARTS AGEcattle-cluster-agent-86994b5844-q64pc 1/1 Running 13 101dcattle-node-agent-fchtn 1/1 Running 12 101dcattle-node-agent-hs2xw 1/1 Running 7 15mcattle-node-agent-l9xq4 1/1 Running 13 101dcattle-node-agent-psm6r 1/1 Running 17 101dcattle-node-agent-xffx9 1/1 Running 11 101drancher-ddd55f7b5-2f22n 1/1 Running 4 101drancher-ddd55f7b5-cc7qk 1/1 Running 0 25mrancher-ddd55f7b5-fstlp 1/1 Running 5 101d[rancher@rmaster01 ~]$


