[rancher@rmaster01 ~]$ kubectl -n cattle-system get pods | grep Evicted | awk '{print $1}' | xargs kubectl -n cattle-system delete pod
pod "rancher-ddd55f7b5-2f9vh" deleted
pod "rancher-ddd55f7b5-464dd" deleted
pod "rancher-ddd55f7b5-5d8vt" deleted
pod "rancher-ddd55f7b5-5mbt9" deleted
pod "rancher-ddd55f7b5-5nmxk" deleted
pod "rancher-ddd55f7b5-6kw8l" deleted
pod "rancher-ddd55f7b5-8228c" deleted
pod "rancher-ddd55f7b5-8m8st" deleted
pod "rancher-ddd55f7b5-8qc6w" deleted
pod "rancher-ddd55f7b5-96r89" deleted
pod "rancher-ddd55f7b5-b226s" deleted
pod "rancher-ddd55f7b5-dmvxf" deleted
pod "rancher-ddd55f7b5-g7gfs" deleted
pod "rancher-ddd55f7b5-gppsv" deleted
pod "rancher-ddd55f7b5-h2gf5" deleted
pod "rancher-ddd55f7b5-hv4tg" deleted
pod "rancher-ddd55f7b5-jwtsh" deleted
pod "rancher-ddd55f7b5-lzmfg" deleted
pod "rancher-ddd55f7b5-m429f" deleted
pod "rancher-ddd55f7b5-m9vkw" deleted
pod "rancher-ddd55f7b5-pm7sx" deleted
pod "rancher-ddd55f7b5-t67ww" deleted
pod "rancher-ddd55f7b5-t8qdl" deleted
pod "rancher-ddd55f7b5-tf4zq" deleted
pod "rancher-ddd55f7b5-w48xt" deleted
pod "rancher-ddd55f7b5-wt5fn" deleted
pod "rancher-ddd55f7b5-xd9cn" deleted
pod "rancher-ddd55f7b5-xjhkg" deleted
pod "rancher-ddd55f7b5-xvd47" deleted
[rancher@rmaster01 ~]$
[rancher@rmaster01 ~]$ kubectl -n cattle-system get pod
NAME READY STATUS RESTARTS AGE
cattle-cluster-agent-86994b5844-q64pc 0/1 CrashLoopBackOff 9 101d
cattle-node-agent-btczr 0/1 CrashLoopBackOff 11 101d
cattle-node-agent-fchtn 0/1 CrashLoopBackOff 8 101d
cattle-node-agent-l9xq4 0/1 CrashLoopBackOff 9 101d
cattle-node-agent-psm6r 0/1 CrashLoopBackOff 13 101d
cattle-node-agent-xffx9 0/1 CrashLoopBackOff 7 101d
rancher-ddd55f7b5-2f22n 1/1 Running 4 101d
rancher-ddd55f7b5-cc7qk 1/1 Running 0 5m22s
rancher-ddd55f7b5-fstlp 1/1 Running 5 101d
[rancher@rmaster01 ~]$
[rancher@rmaster01 ~]$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
node01 Ready worker 101d v1.17.5
node02 Ready worker 101d v1.17.5
rmaster01 Ready controlplane,etcd 101d v1.17.5
rmaster02 Ready controlplane,etcd 101d v1.17.5
rmaster03 Ready controlplane,etcd 101d v1.17.5
[rancher@rmaster01 ~]$ kubectl get cs
NAME STATUS MESSAGE ERROR
scheduler Healthy ok
controller-manager Healthy ok
etcd-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-btczr
Name: cattle-node-agent-btczr
Namespace: cattle-system
Priority: 0
Node: node01/192.168.11.103
Start Time: Sun, 07 Jun 2020 07:10:31 +0800
Labels: app=cattle-agent
controller-revision-hash=7bc84ddb5c
pod-template-generation=1
Annotations: <none>
Status: Running
IP: 192.168.11.103
IPs:
IP: 192.168.11.103
Controlled By: DaemonSet/cattle-node-agent
Containers:
agent:
Container ID: docker://60bbd3bd00f17cbae35a5001c66a1d2446a15a5928ded30ff233ec935d4049a8
Image: cnrancher/rancher-agent:v2.3.6-ent
Image ID: docker-pullable://cnrancher/rancher-agent@sha256:bc3cfaad4d5ec3619be29de663bab265613b09206f91061429a40bae8cca2e46
Port: <none>
Host Port: <none>
State: Waiting
Reason: CrashLoopBackOff
Last State: Terminated
Reason: Error
Exit Code: 1
Started: Wed, 16 Sep 2020 10:50:41 +0800
Finished: Wed, 16 Sep 2020 10:50:44 +0800
Ready: False
Restart Count: 11
Environment:
CATTLE_NODE_NAME: (v1:spec.nodeName)
CATTLE_SERVER: https://192.168.11.99
CATTLE_CA_CHECKSUM: 8552b9769db529116c74fe264fcbf2dcc958ccd80691c74e44e3a1be3c346b03
CATTLE_CLUSTER: false
CATTLE_K8S_MANAGED: true
CATTLE_AGENT_CONNECT: true
Mounts:
/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 Status
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
k8s-ssl:
Type: HostPath (bare host directory volume)
Path: /etc/kubernetes
HostPathType: DirectoryOrCreate
var-run:
Type: HostPath (bare host directory volume)
Path: /var/run
HostPathType: DirectoryOrCreate
run:
Type: HostPath (bare host directory volume)
Path: /run
HostPathType: DirectoryOrCreate
cattle-credentials:
Type: Secret (a volume populated by a Secret)
SecretName: cattle-credentials-23d7231
Optional: false
docker-certs:
Type: HostPath (bare host directory volume)
Path: /etc/docker/certs.d
HostPathType: DirectoryOrCreate
cattle-token-k2f8j:
Type: Secret (a volume populated by a Secret)
SecretName: cattle-token-k2f8j
Optional: false
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations:
node.kubernetes.io/disk-pressure:NoSchedule
node.kubernetes.io/memory-pressure:NoSchedule
node.kubernetes.io/network-unavailable:NoSchedule
node.kubernetes.io/not-ready:NoExecute
node.kubernetes.io/pid-pressure:NoSchedule
node.kubernetes.io/unreachable:NoExecute
node.kubernetes.io/unschedulable:NoSchedule
Events:
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 machine
Normal Created 13m (x4 over 15m) kubelet, node01 Created container agent
Normal Started 13m (x4 over 15m) kubelet, node01 Started container agent
Warning 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-btczr
Name: cattle-node-agent-btczr
Namespace: cattle-system
Priority: 0
Node: node01/192.168.11.103
Start Time: Sun, 07 Jun 2020 07:10:31 +0800
Labels: app=cattle-agent
controller-revision-hash=7bc84ddb5c
pod-template-generation=1
Annotations: <none>
Status: Running
IP: 192.168.11.103
IPs:
IP: 192.168.11.103
Controlled By: DaemonSet/cattle-node-agent
Containers:
agent:
Container ID: docker://60bbd3bd00f17cbae35a5001c66a1d2446a15a5928ded30ff233ec935d4049a8
Image: cnrancher/rancher-agent:v2.3.6-ent
Image ID: docker-pullable://cnrancher/rancher-agent@sha256:bc3cfaad4d5ec3619be29de663bab265613b09206f91061429a40bae8cca2e46
Port: <none>
Host Port: <none>
State: Waiting
Reason: CrashLoopBackOff
Last State: Terminated
Reason: Error
Exit Code: 1
Started: Wed, 16 Sep 2020 10:50:41 +0800
Finished: Wed, 16 Sep 2020 10:50:44 +0800
Ready: False
Restart Count: 11
Environment:
CATTLE_NODE_NAME: (v1:spec.nodeName)
CATTLE_SERVER: https://192.168.11.99
CATTLE_CA_CHECKSUM: 8552b9769db529116c74fe264fcbf2dcc958ccd80691c74e44e3a1be3c346b03
CATTLE_CLUSTER: false
CATTLE_K8S_MANAGED: true
CATTLE_AGENT_CONNECT: true
Mounts:
/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 Status
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
k8s-ssl:
Type: HostPath (bare host directory volume)
Path: /etc/kubernetes
HostPathType: DirectoryOrCreate
var-run:
Type: HostPath (bare host directory volume)
Path: /var/run
HostPathType: DirectoryOrCreate
run:
Type: HostPath (bare host directory volume)
Path: /run
HostPathType: DirectoryOrCreate
cattle-credentials:
Type: Secret (a volume populated by a Secret)
SecretName: cattle-credentials-23d7231
Optional: false
docker-certs:
Type: HostPath (bare host directory volume)
Path: /etc/docker/certs.d
HostPathType: DirectoryOrCreate
cattle-token-k2f8j:
Type: Secret (a volume populated by a Secret)
SecretName: cattle-token-k2f8j
Optional: false
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations:
node.kubernetes.io/disk-pressure:NoSchedule
node.kubernetes.io/memory-pressure:NoSchedule
node.kubernetes.io/network-unavailable:NoSchedule
node.kubernetes.io/not-ready:NoExecute
node.kubernetes.io/pid-pressure:NoSchedule
node.kubernetes.io/unreachable:NoExecute
node.kubernetes.io/unschedulable:NoSchedule
Events:
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 machine
Normal Created 13m (x4 over 15m) kubelet, node01 Created container agent
Normal Started 13m (x4 over 15m) kubelet, node01 Started container agent
Warning BackOff 4m44s (x46 over 14m) kubelet, node01 Back-off restarting failed container
[rancher@rmaster01 ~]$
[rancher@rmaster01 ~]$ kubectl -n cattle-system get pod
NAME READY STATUS RESTARTS AGE
cattle-cluster-agent-86994b5844-q64pc 0/1 CrashLoopBackOff 10 101d
cattle-node-agent-btczr 0/1 CrashLoopBackOff 11 101d
cattle-node-agent-fchtn 0/1 CrashLoopBackOff 9 101d
cattle-node-agent-l9xq4 0/1 CrashLoopBackOff 10 101d
cattle-node-agent-psm6r 0/1 CrashLoopBackOff 13 101d
cattle-node-agent-xffx9 0/1 CrashLoopBackOff 8 101d
rancher-ddd55f7b5-2f22n 1/1 Running 4 101d
rancher-ddd55f7b5-cc7qk 1/1 Running 0 7m59s
rancher-ddd55f7b5-fstlp 1/1 Running 5 101d
[rancher@rmaster01 ~]$ kubectl -n cattle-system describe pod cattle-cluster-agent-86994b5844-q64pc
Name: cattle-cluster-agent-86994b5844-q64pc
Namespace: cattle-system
Priority: 0
Node: rmaster03/192.168.11.102
Start Time: Sun, 07 Jun 2020 07:10:31 +0800
Labels: app=cattle-cluster-agent
pod-template-hash=86994b5844
Annotations: cni.projectcalico.org/podIP: 10.42.1.4/32
cni.projectcalico.org/podIPs: 10.42.1.4/32
Status: Running
IP: 10.42.1.4
IPs:
IP: 10.42.1.4
Controlled By: ReplicaSet/cattle-cluster-agent-86994b5844
Containers:
cluster-register:
Container ID: docker://9385d83c276099915ecb676938dfe47f989dab64b1ba1d7130416b0f09c41871
Image: cnrancher/rancher-agent:v2.3.6-ent
Image ID: docker-pullable://cnrancher/rancher-agent@sha256:bc3cfaad4d5ec3619be29de663bab265613b09206f91061429a40bae8cca2e46
Port: <none>
Host Port: <none>
State: Waiting
Reason: CrashLoopBackOff
Last State: Terminated
Reason: Error
Exit Code: 1
Started: Wed, 16 Sep 2020 10:54:09 +0800
Finished: Wed, 16 Sep 2020 10:54:13 +0800
Ready: False
Restart Count: 10
Environment:
CATTLE_SERVER: https://192.168.11.99
CATTLE_CA_CHECKSUM: 8552b9769db529116c74fe264fcbf2dcc958ccd80691c74e44e3a1be3c346b03
CATTLE_CLUSTER: true
CATTLE_K8S_MANAGED: true
Mounts:
/cattle-credentials from cattle-credentials (ro)
/var/run/secrets/kubernetes.io/serviceaccount from cattle-token-k2f8j (ro)
Conditions:
Type Status
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
cattle-credentials:
Type: Secret (a volume populated by a Secret)
SecretName: cattle-credentials-23d7231
Optional: false
cattle-token-k2f8j:
Type: Secret (a volume populated by a Secret)
SecretName: cattle-token-k2f8j
Optional: false
QoS Class: BestEffort
Node-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 machine
Normal Created 15m (x4 over 17m) kubelet, rmaster03 Created container cluster-register
Normal Started 15m (x4 over 17m) kubelet, rmaster03 Started container cluster-register
Warning BackOff 2m36s (x68 over 17m) kubelet, rmaster03 Back-off restarting failed container
[rancher@rmaster01 ~]$
[rancher@rmaster01 ~]$ kubectl -n cattle-system get secrets
NAME TYPE DATA AGE
cattle-credentials-23d7231 Opaque 2 101d
cattle-setting-provider Opaque 64 101d
cattle-token-k2f8j kubernetes.io/service-account-token 3 101d
default-token-sjsg6 kubernetes.io/service-account-token 3 101d
rancher-token-ms5cc kubernetes.io/service-account-token 3 101d
sh.helm.release.v1.rancher.v1 helm.sh/release.v1 1 101d
tls-ca Opaque 1 101d
tls-rancher-ingress kubernetes.io/tls 2 101d
[rancher@rmaster01 ~]$
[rancher@rmaster01 ~]$ kubectl -n cattle-system delete pod cattle-node-agent-btczr
pod "cattle-node-agent-btczr" deleted
[rancher@rmaster01 ~]$ kubectl -n cattle-system get pod -w
NAME READY STATUS RESTARTS AGE
cattle-cluster-agent-86994b5844-q64pc 0/1 CrashLoopBackOff 10 101d
cattle-node-agent-fchtn 0/1 CrashLoopBackOff 9 101d
cattle-node-agent-hs2xw 1/1 Running 0 3s
cattle-node-agent-l9xq4 0/1 CrashLoopBackOff 10 101d
cattle-node-agent-psm6r 0/1 CrashLoopBackOff 14 101d
cattle-node-agent-xffx9 0/1 CrashLoopBackOff 8 101d
rancher-ddd55f7b5-2f22n 1/1 Running 4 101d
rancher-ddd55f7b5-cc7qk 1/1 Running 0 10m
rancher-ddd55f7b5-fstlp 1/1 Running 5 101d
cattle-node-agent-hs2xw 0/1 Error 0 4s
cattle-node-agent-hs2xw 1/1 Running 1 5s
cattle-node-agent-hs2xw 0/1 Error 1 7s
[rancher@rmaster01 ~]$ kubectl -n cattle-system describe pod cattle-node-agent-hs2xw
Name: cattle-node-agent-hs2xw
Namespace: cattle-system
Priority: 0
Node: node01/192.168.11.103
Start Time: Wed, 16 Sep 2020 10:57:58 +0800
Labels: app=cattle-agent
controller-revision-hash=7bc84ddb5c
pod-template-generation=1
Annotations: <none>
Status: Running
IP: 192.168.11.103
IPs:
IP: 192.168.11.103
Controlled By: DaemonSet/cattle-node-agent
Containers:
agent:
Container ID: docker://182bfb49c88e802bb6c84b9d983f950ff4f2820c59229b2024a9b7d361270721
Image: cnrancher/rancher-agent:v2.3.6-ent
Image ID: docker-pullable://cnrancher/rancher-agent@sha256:bc3cfaad4d5ec3619be29de663bab265613b09206f91061429a40bae8cca2e46
Port: <none>
Host Port: <none>
State: Waiting
Reason: CrashLoopBackOff
Last State: Terminated
Reason: Error
Exit Code: 1
Started: Wed, 16 Sep 2020 10:58:19 +0800
Finished: Wed, 16 Sep 2020 10:58:22 +0800
Ready: False
Restart Count: 2
Environment:
CATTLE_NODE_NAME: (v1:spec.nodeName)
CATTLE_SERVER: https://192.168.11.99
CATTLE_CA_CHECKSUM: 8552b9769db529116c74fe264fcbf2dcc958ccd80691c74e44e3a1be3c346b03
CATTLE_CLUSTER: false
CATTLE_K8S_MANAGED: true
CATTLE_AGENT_CONNECT: true
Mounts:
/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 Status
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
k8s-ssl:
Type: HostPath (bare host directory volume)
Path: /etc/kubernetes
HostPathType: DirectoryOrCreate
var-run:
Type: HostPath (bare host directory volume)
Path: /var/run
HostPathType: DirectoryOrCreate
run:
Type: HostPath (bare host directory volume)
Path: /run
HostPathType: DirectoryOrCreate
cattle-credentials:
Type: Secret (a volume populated by a Secret)
SecretName: cattle-credentials-23d7231
Optional: false
docker-certs:
Type: HostPath (bare host directory volume)
Path: /etc/docker/certs.d
HostPathType: DirectoryOrCreate
cattle-token-k2f8j:
Type: Secret (a volume populated by a Secret)
SecretName: cattle-token-k2f8j
Optional: false
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations:
node.kubernetes.io/disk-pressure:NoSchedule
node.kubernetes.io/memory-pressure:NoSchedule
node.kubernetes.io/network-unavailable:NoSchedule
node.kubernetes.io/not-ready:NoExecute
node.kubernetes.io/pid-pressure:NoSchedule
node.kubernetes.io/unreachable:NoExecute
node.kubernetes.io/unschedulable:NoSchedule
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled <unknown> default-scheduler Successfully assigned cattle-system/cattle-node-agent-hs2xw to node01
Warning BackOff 16s (x3 over 43s) kubelet, node01 Back-off restarting failed container
Normal Pulled 2s (x4 over 50s) kubelet, node01 Container image "cnrancher/rancher-agent:v2.3.6-ent" already present on machine
Normal Created 1s (x4 over 50s) kubelet, node01 Created container agent
Normal Started 1s (x4 over 50s) kubelet, node01 Started container agent
[rancher@rmaster01 ~]$
[rancher@rmaster01 ~]$ kubectl -n cattle-system get pod
NAME READY STATUS RESTARTS AGE
cattle-cluster-agent-86994b5844-q64pc 0/1 CrashLoopBackOff 11 101d
cattle-node-agent-fchtn 0/1 CrashLoopBackOff 10 101d
cattle-node-agent-hs2xw 0/1 CrashLoopBackOff 4 118s
cattle-node-agent-l9xq4 0/1 CrashLoopBackOff 11 101d
cattle-node-agent-psm6r 0/1 CrashLoopBackOff 14 101d
cattle-node-agent-xffx9 0/1 CrashLoopBackOff 9 101d
rancher-ddd55f7b5-2f22n 1/1 Running 4 101d
rancher-ddd55f7b5-cc7qk 1/1 Running 0 12m
rancher-ddd55f7b5-fstlp 1/1 Running 5 101d
[rancher@rmaster01 ~]$ kubectl -n cattle-system logs cattle-node-agent-hs2xw
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
INFO: Using resolv.conf: nameserver 114.114.114.114
ERROR: 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.114
PING 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 ms
64 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 1001ms
rtt min/avg/max/mdev = 10.537/11.380/12.223/0.843 ms
[rancher@rmaster01 ~]$ ping 192.168.11.99
PING 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 -w
NAME READY STATUS RESTARTS AGE
cattle-cluster-agent-86994b5844-q64pc 0/1 CrashLoopBackOff 11 101d
cattle-node-agent-fchtn 0/1 CrashLoopBackOff 10 101d
cattle-node-agent-hs2xw 0/1 Error 6 6m2s
cattle-node-agent-l9xq4 0/1 CrashLoopBackOff 11 101d
cattle-node-agent-psm6r 0/1 CrashLoopBackOff 15 101d
cattle-node-agent-xffx9 0/1 CrashLoopBackOff 10 101d
rancher-ddd55f7b5-2f22n 1/1 Running 4 101d
rancher-ddd55f7b5-cc7qk 1/1 Running 0 16m
rancher-ddd55f7b5-fstlp 1/1 Running 5 101d
cattle-node-agent-fchtn 1/1 Running 11 101d
cattle-node-agent-fchtn 0/1 Error 11 101d
cattle-node-agent-hs2xw 0/1 CrashLoopBackOff 6 6m12s
cattle-node-agent-fchtn 0/1 CrashLoopBackOff 11 101d
cattle-cluster-agent-86994b5844-q64pc 1/1 Running 12 101d
cattle-cluster-agent-86994b5844-q64pc 0/1 Error 12 101d
cattle-cluster-agent-86994b5844-q64pc 0/1 CrashLoopBackOff 12 101d
^C[rancher@rmaster01 ~]$
[rancher@rmaster01 ~]$ kubectl -n cattle-system get pod
NAME READY STATUS RESTARTS AGE
cattle-cluster-agent-86994b5844-q64pc 1/1 Running 13 101d
cattle-node-agent-fchtn 1/1 Running 12 101d
cattle-node-agent-hs2xw 1/1 Running 7 13m
cattle-node-agent-l9xq4 1/1 Running 13 101d
cattle-node-agent-psm6r 0/1 CrashLoopBackOff 16 101d
cattle-node-agent-xffx9 1/1 Running 11 101d
rancher-ddd55f7b5-2f22n 1/1 Running 4 101d
rancher-ddd55f7b5-cc7qk 1/1 Running 0 24m
rancher-ddd55f7b5-fstlp 1/1 Running 5 101d
[rancher@rmaster01 ~]$ kubectl -n cattle-system describe pod cattle-cluster-agent-86994b5844-q64pc
Name: cattle-cluster-agent-86994b5844-q64pc
Namespace: cattle-system
Priority: 0
Node: rmaster03/192.168.11.102
Start Time: Sun, 07 Jun 2020 07:10:31 +0800
Labels: app=cattle-cluster-agent
pod-template-hash=86994b5844
Annotations: cni.projectcalico.org/podIP: 10.42.1.4/32
cni.projectcalico.org/podIPs: 10.42.1.4/32
Status: Running
IP: 10.42.1.4
IPs:
IP: 10.42.1.4
Controlled By: ReplicaSet/cattle-cluster-agent-86994b5844
Containers:
cluster-register:
Container ID: docker://2f63f94a1be8c8cc807b220d63c751962dc490afd8cb96f56fd4a38eda3fcb35
Image: cnrancher/rancher-agent:v2.3.6-ent
Image ID: docker-pullable://cnrancher/rancher-agent@sha256:bc3cfaad4d5ec3619be29de663bab265613b09206f91061429a40bae8cca2e46
Port: <none>
Host Port: <none>
State: Running
Started: Wed, 16 Sep 2020 11:09:26 +0800
Last State: Terminated
Reason: Error
Exit Code: 1
Started: Wed, 16 Sep 2020 11:04:20 +0800
Finished: Wed, 16 Sep 2020 11:04:23 +0800
Ready: True
Restart Count: 13
Environment:
CATTLE_SERVER: https://192.168.11.99
CATTLE_CA_CHECKSUM: 8552b9769db529116c74fe264fcbf2dcc958ccd80691c74e44e3a1be3c346b03
CATTLE_CLUSTER: true
CATTLE_K8S_MANAGED: true
Mounts:
/cattle-credentials from cattle-credentials (ro)
/var/run/secrets/kubernetes.io/serviceaccount from cattle-token-k2f8j (ro)
Conditions:
Type Status
Initialized True
Ready True
ContainersReady True
PodScheduled True
Volumes:
cattle-credentials:
Type: Secret (a volume populated by a Secret)
SecretName: cattle-credentials-23d7231
Optional: false
cattle-token-k2f8j:
Type: Secret (a volume populated by a Secret)
SecretName: cattle-token-k2f8j
Optional: false
QoS Class: BestEffort
Node-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 machine
Normal Created 32m (x4 over 34m) kubelet, rmaster03 Created container cluster-register
Normal Started 32m (x4 over 34m) kubelet, rmaster03 Started container cluster-register
Warning BackOff 4m8s (x136 over 34m) kubelet, rmaster03 Back-off restarting failed container
[rancher@rmaster01 ~]$ kubectl -n cattle-system logs cattle-cluster-agent-86994b5844-q64pc
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
INFO: Using resolv.conf: nameserver 10.43.0.10 search cattle-system.svc.cluster.local svc.cluster.local cluster.local options ndots:5
INFO: https://192.168.11.99/ping is accessible
INFO: Value from https://192.168.11.99/v3/settings/cacerts is an x509 certificate
time="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 pod
NAME READY STATUS RESTARTS AGE
cattle-cluster-agent-86994b5844-q64pc 1/1 Running 13 101d
cattle-node-agent-fchtn 1/1 Running 12 101d
cattle-node-agent-hs2xw 1/1 Running 7 15m
cattle-node-agent-l9xq4 1/1 Running 13 101d
cattle-node-agent-psm6r 1/1 Running 17 101d
cattle-node-agent-xffx9 1/1 Running 11 101d
rancher-ddd55f7b5-2f22n 1/1 Running 4 101d
rancher-ddd55f7b5-cc7qk 1/1 Running 0 25m
rancher-ddd55f7b5-fstlp 1/1 Running 5 101d
[rancher@rmaster01 ~]$