Closed heshengkai closed 9 months ago
apiVersion: spiderpool.spidernet.io/v2beta1 kind: SpiderCoordinator metadata: creationTimestamp: "2024-01-04T05:45:05Z" finalizers:
Hi @heshengkai thanks for the report. Can you show the controller-manager pod by using the following command?
kubectl get po -n kube-system
Also, Do you install kube-controller-manager as a systemd progress?
Hi @cyclinder Thanks for your reply。 [root@earthgod01 ~]# kubectl get pod -n kube-system NAME READY STATUS RESTARTS AGE calico-kube-controllers-6c5c4f66c5-dc6dq 1/1 Running 50 (16d ago) 20d calico-kube-controllers-6c5c4f66c5-hwbfd 1/1 Running 49 (16d ago) 20d calico-node-5cd6l 1/1 Running 0 22h calico-node-6gbdd 1/1 Running 0 22h calico-node-gtckq 1/1 Running 0 22h calico-typha-7f5748f48c-g55rb 1/1 Running 64 (16d ago) 20d calico-typha-7f5748f48c-skcw7 1/1 Running 0 20d coredns-7557dbcd86-4pnxj 1/1 Running 0 20d coredns-7557dbcd86-59gc5 1/1 Running 0 9d metrics-server-55f7bdc47-p8z5w 1/1 Running 0 9d spiderpool-agent-289p9 1/1 Running 0 19h spiderpool-agent-fgdkf 1/1 Running 0 19h spiderpool-agent-fqg84 1/1 Running 0 19h spiderpool-controller-55d456c9c6-z5z67 1/1 Running 0 19h spiderpool-init 0/1 Completed 0 19h
[root@earthgod01 ~]# systemctl status kube-controller-manager.service ● kube-controller-manager.service - Kubernetes Controller Manager Loaded: loaded (/usr/lib/systemd/system/kube-controller-manager.service; enabled; vendor preset: disabled) Active: active (running) since Thu 2024-01-04 14:59:56 CST; 18h ago Docs: https://github.com/GoogleCloudPlatform/kubernetes Main PID: 85870 (kube-log-runner) Tasks: 19 Memory: 114.0M CGroup: /system.slice/kube-controller-manager.service ├─85870 /data/server/master/bin/kube-log-runner --log-file=/var/log/k8s/master/kube-controller-manager.log --redirect-stderr=true /data/server/master/bin/kube-controller-manager --secure-port=10257 --bind-address=0.0.0.0 --kubeconfig=/data/server/certs/mas> └─85875 /data/server/master/bin/kube-controller-manager --secure-port=10257 --bind-address=0.0.0.0 --kubeconfig=/data/server/certs/master/kube-controller-manager.kubeconfig --authentication-kubeconfig=/data/server/certs/master/kube-controller-manager.kubec> Jan 04 14:59:56 earthgod01 systemd[1]: Started Kubernetes Controller Manager. Jan 04 14:59:56 earthgod01 kube-log-runner[85870]: 2024/01/04 14:59:56 Running command: Jan 04 14:59:56 earthgod01 kube-log-runner[85870]: Command env: (log-file=/var/log/k8s/master/kube-controller-manager.log, also-stdout=false, redirect-stderr=true) Jan 04 14:59:56 earthgod01 kube-log-runner[85870]: Run from directory: Jan 04 14:59:56 earthgod01 kube-log-runner[85870]: Executable path: /data/server/master/bin/kube-controller-manager Jan 04 14:59:56 earthgod01 kube-log-runner[85870]: Args (comma-delimited): /data/server/master/bin/kube-controller-manager,--secure-port=10257,--bind-address=0.0.0.0,--kubeconfig=/data/server/certs/master/kube-controller-manager.kubeconfig,--authentication-kubeconfig>Jan 04 14:59:56 earthgod01 kube-log-runner[85870]: 2024/01/04 14:59:56 Now listening for interrupts
I use the hardware architecture of arm64
I want to know how did you build your cluster? your kube-controller-manager pod is running as a systemd process, so we can't find the CIDR from this. Can you show me your kube-controller-manager's config file? I guess you can find it in /usr/lib/systemd/system/kube-controller-manager.service
or else.
[root@earthgod01 ~]# cat /usr/lib/systemd/system/kube-controller-manager.service [Unit] Description=Kubernetes Controller Manager Documentation=https://github.com/GoogleCloudPlatform/kubernetes
[Service]
NotifyAccess=all ExecStart=/data/server/master/bin/kube-log-runner \ --log-file=/var/log/k8s/master/kube-controller-manager.log \ --redirect-stderr=true \ /data/server/master/bin/kube-controller-manager \ --secure-port=10257 \ --bind-address=0.0.0.0 \ --kubeconfig=/data/server/certs/master/kube-controller-manager.kubeconfig \ --authentication-kubeconfig=/data/server/certs/master/kube-controller-manager.kubeconfig \ --authorization-kubeconfig=/data/server/certs/master/kube-controller-manager.kubeconfig \ --service-cluster-ip-range=192.168.0.0/16 \ --cluster-name=kubernetes \ --cluster-signing-cert-file=/data/server/certs/ca/k8s/master/ca.pem \ --cluster-signing-key-file=/data/server/certs/ca/k8s/master/ca-key.pem \ --cluster-signing-duration=175200h \ --root-ca-file=/data/server/certs/ca/k8s/master/ca.pem \ --service-account-private-key-file=/data/server/certs/ca/k8s/master/ca-key.pem \ --leader-elect=true \ --feature-gates=RotateKubeletServerCertificate=true,DynamicResourceAllocation=true \ --controllers=*,bootstrapsigner,tokencleaner \ --tls-cert-file=/data/server/certs/master/kube-controller-manager.pem \ --tls-private-key-file=/data/server/certs/master/kube-controller-manager-key.pem \ --use-service-account-credentials=true \ --v=2 Restart=always RestartSec=5 StartLimitInterval=0
[Install] WantedBy=multi-user.target
I did not set the pod cidr in my kube-controller-manager.service
We indeed didn't consider this case. I made a fix for it. Could you please take a look and let me know if this fix works for you?
@cyclinder thanks for your fix, I'll take a look at it and synchronize it with you。
Spiderpool Version
v0.9.0
Bug Type
Spiderpool-Controller
Main CNI
calico
What happened?
{"level":"INFO","ts":"2024-01-04T06:22:37.528Z","logger":"spiderpool","caller":"record/event.go:298","msg":"Event(v1.ObjectReference{Kind:\"SpiderCoordinator\", Namespace:\"\", Name:\"default\", UID:\"93fa9606-f21d-42d7-8708-6c05a3280407\", APIVersion:\"spiderpool.spidernet.io/v2beta1\", ResourceVersion:\"2807117\", FieldPath:\"\"}): type: 'Warning' reason: 'ClusterNotReady' Failed to get kube-controller-manager Pod with label \"component: kube-controller-manager\""}
What did you expect to happen?
No
How to reproduce it (as minimally and precisely as possible)
no
Additional Context
k8s version: 1.26.6 Deployment mode: Binary