kubesphere-system 下 的ks-controller-manager 运行不正常,pod s显示CrashLoopBackOff. 查看日志 显示如下:

![W0113] 19:49:02.867681 1 client_config.go:543] Neither –kubeconfig nor –master was specified. Using the inClusterConfig. This might not work.

E0113 19:49:02.889944 1 server.go:81] failed to connect to ldap service, please check ldap status, error: factory is not able to fill the pool: LDAP Result Code 200 “Network Error”: dial tcp: lookup openldap.kubesphere-system.svc on 10.233.0.10:53: no such host

请问大家有遇到过这种问题吗?有什么好的解决方法吗?

kubectl -n kubesphere-system  get pods
NAME                                     READY   STATUS             RESTARTS   AGE
etcd-85c98fb695-6qgwx                    1/1     Running            484        7d19h
ks-apiserver-58b566dcc8-24bch            1/1     Running            0          14h
ks-apiserver-58b566dcc8-f4z7c            1/1     Running            0          14h
ks-apiserver-58b566dcc8-s7m6l            1/1     Running            0          14h
ks-console-674746b4d6-49qsb              1/1     Running            2          23d
ks-console-674746b4d6-dnfl7              1/1     Running            0          6d21h
ks-console-674746b4d6-vrxkp              1/1     Running            1          23d
ks-controller-manager-577f8cb8f9-fn82b   0/1     CrashLoopBackOff   178        14h
ks-controller-manager-577f8cb8f9-jbqfr   0/1     CrashLoopBackOff   178        14h
ks-controller-manager-c6d89455-2xvpn     0/1     CrashLoopBackOff   178        14h
ks-installer-6f975b7658-dplwt            1/1     Running            0          14d
minio-764b67f6fb-phn9d                   1/1     Running            4          7d19h
mysql-c4dfc584d-wdpsl                    1/1     Running            0          16d
openldap-0                               0/1     CrashLoopBackOff   14         47m
redis-ha-haproxy-ffb8d889d-5jlfq         1/1     Running            2          36d
redis-ha-haproxy-ffb8d889d-jr27w         1/1     Running            6          35d
redis-ha-haproxy-ffb8d889d-t85xq         1/1     Running            0          7d10h
redis-ha-server-0                        2/2     Running            8          35d
redis-ha-server-1                        2/2     Running            33         50d
redis-ha-server-2                        2/2     Running            10         7d19h
tower-8c868486-qsj6q                     1/1     Running            0          17h
  • Jeff 回复了此帖

    kubectl -n kubesphere-system describe pod ks-controller-manager-577f8cb8f9-fn82b
    Name: ks-controller-manager-577f8cb8f9-fn82b
    Namespace: kubesphere-system
    Priority: 0
    Node: ccq02208/19.228.62.169
    Start Time: Wed, 13 Jan 2021 05:17:44 -0500
    Labels: app=ks-controller-manager
    pod-template-hash=577f8cb8f9
    tier=backend
    version=v3.0.0
    Annotations: cni.projectcalico.org/podIP: 10.233.119.85/32
    cni.projectcalico.org/podIPs: 10.233.119.85/32
    kubectl.kubernetes.io/restartedAt: 2021-01-13T05:16:04-05:00
    kubesphere.io/containerSecrets:
    kubesphere.io/restartedAt: 2021-01-13T01:25:41.885Z
    Status: Running
    IP: 10.233.119.85
    IPs:
    IP: 10.233.119.85
    Controlled By: ReplicaSet/ks-controller-manager-577f8cb8f9
    Containers:
    ks-controller-manager:
    Container ID: docker://5a92193b26508d20ce76eb016fbb3a0b24da090618bfefe9c2022de57b7c0a17
    Image: kubesphere/ks-controller-manager:v3.0.0
    Image ID: docker-pullable://kubesphere/ks-controller-manager@sha256:1ae2f2880d254aa0339b18598eb946d397cac62941a4022232dab2a148bdacdb
    Ports: 8080/TCP, 8443/TCP
    Host Ports: 0/TCP, 0/TCP
    Command:
    controller-manager
    –logtostderr=true
    –leader-elect=true
    State: Waiting
    Reason: CrashLoopBackOff
    Last State: Terminated
    Reason: Error
    Exit Code: 1
    Started: Wed, 13 Jan 2021 20:04:28 -0500
    Finished: Wed, 13 Jan 2021 20:04:28 -0500
    Ready: False
    Restart Count: 178
    Limits:
    cpu: 1
    memory: 1000Mi
    Requests:
    cpu: 30m
    memory: 50Mi
    Environment: <none>
    Mounts:
    /etc/kubesphere/ from kubesphere-config (rw)
    /etc/localtime from host-time (rw)
    /tmp/k8s-webhook-server/serving-certs from webhook-secret (rw)
    /var/lib/kubelet/plugins/ from kubelet-plugin (rw)
    /var/run/secrets/kubernetes.io/serviceaccount from kubesphere-token-tdxn5 (ro)
    Conditions:
    Type Status
    Initialized True
    Ready False
    ContainersReady False
    PodScheduled True
    Volumes:
    kubesphere-config:
    Type: ConfigMap (a volume populated by a ConfigMap)
    Name: kubesphere-config
    Optional: false
    webhook-secret:
    Type: Secret (a volume populated by a Secret)
    SecretName: ks-controller-manager-webhook-cert
    Optional: false
    kubelet-plugin:
    Type: HostPath (bare host directory volume)
    Path: /var/lib/kubelet/plugins/
    HostPathType: DirectoryOrCreate
    host-time:
    Type: HostPath (bare host directory volume)
    Path: /etc/localtime
    HostPathType:
    kubesphere-token-tdxn5:
    Type: Secret (a volume populated by a Secret)
    SecretName: kubesphere-token-tdxn5
    Optional: false
    QoS Class: Burstable
    Node-Selectors: <none>
    Tolerations: CriticalAddonsOnly
    node-role.kubernetes.io/master:NoSchedule
    node.kubernetes.io/not-ready:NoExecute for 60s
    node.kubernetes.io/unreachable:NoExecute for 60s
    Events:
    Type Reason Age From Message


    Warning BackOff 48s (x4110 over 14h) kubelet, ccq02208 Back-off restarting failed container

    检查下coredns日志 现在报错是dns无法解析

    7101200 你查查为啥openldap出错了,先把这个问题解决了