环境:centos7,kubesphere v3.1.1
执行安装:
# 执行命令
kubectl apply -f cluster-configuration.yaml
排查信息:
# 查看 pod
kubectl get pod -A
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system calico-node-2r276 1/1 Running 1 17h
kube-system calico-node-bb9lj 1/1 Running 1 17h
kube-system calico-node-crgvs 1/1 Running 1 17h
kube-system coredns-5897cd56c4-79sng 1/1 Running 3 23h
kube-system coredns-5897cd56c4-9nrlw 1/1 Running 3 23h
kube-system etcd-k8s-master 1/1 Running 3 23h
kube-system kube-apiserver-k8s-master 1/1 Running 3 23h
kube-system kube-controller-manager-k8s-master 1/1 Running 3 23h
kube-system kube-proxy-947v2 1/1 Running 2 22h
kube-system kube-proxy-gfrkx 1/1 Running 3 23h
kube-system kube-proxy-rl2bd 1/1 Running 2 22h
kube-system kube-scheduler-k8s-master 1/1 Running 3 23h
kubesphere-system ks-installer-54c6bcf76b-nx7ql 0/1 CrashLoopBackOff 23 17h
# 查看安装进度
kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0].metadata.name}') -f
# 报错信息如下:
install -o jsonpath='{.items[0].metadata.name}') -f
2024-05-14T11:22:16+08:00 INFO : shell-operator latest
2024-05-14T11:22:16+08:00 INFO : Use temporary dir: /tmp/shell-operator
2024-05-14T11:22:16+08:00 INFO : Initialize hooks manager ...
2024-05-14T11:22:16+08:00 INFO : Search and load hooks ...
2024-05-14T11:22:16+08:00 INFO : Load hook config from '/hooks/kubesphere/installRunner.py'
2024-05-14T11:22:16+08:00 INFO : HTTP SERVER Listening on 0.0.0.0:9115
2024-05-14T11:22:17+08:00 INFO : Load hook config from '/hooks/kubesphere/schedule.sh'
2024-05-14T11:22:17+08:00 INFO : Initializing schedule manager ...
2024-05-14T11:22:17+08:00 INFO : KUBE Init Kubernetes client
2024-05-14T11:22:17+08:00 INFO : KUBE-INIT Kubernetes client is configured successfully
2024-05-14T11:22:17+08:00 INFO : MAIN: run main loop
2024-05-14T11:22:17+08:00 INFO : MAIN: add onStartup tasks
2024-05-14T11:22:17+08:00 INFO : Running schedule manager ...
2024-05-14T11:22:17+08:00 INFO : QUEUE add all HookRun@OnStartup
2024-05-14T11:22:17+08:00 INFO : MSTOR Create new metric shell_operator_live_ticks
2024-05-14T11:22:17+08:00 INFO : MSTOR Create new metric shell_operator_tasks_queue_length
2024-05-14T11:22:47+08:00 ERROR : error getting GVR for kind 'ClusterConfiguration': Get "https://10.96.0.1:443/api?timeout=32s": dial tcp 10.96.0.1:443: i/o timeout
2024-05-14T11:22:47+08:00 ERROR : Enable kube events for hooks error: Get "https://10.96.0.1:443/api?timeout=32s": dial tcp 10.96.0.1:443: i/o timeout
2024-05-14T11:22:47+08:00 INFO : TASK_RUN Exit: program halts.