查看pod状态:
~/Test/k8s » kubectl get pods -n kubesphere-system tangyi3@bj-m-212915a
NAME READY STATUS RESTARTS AGE
ks-installer-76b7888579-hk7md 0/1 CrashLoopBackOff 9 23m`
查看pod日志:
`~/Test/k8s » kubectl logs -f ks-installer-76b7888579-hk7md -n kubesphere-system tangyi3@bj-m-212915a
2020-01-07T09:26:53Z INFO : shell-operator v1.0.0-beta.5
2020-01-07T09:26:53Z INFO : HTTP SERVER Listening on 0.0.0.0:9115
2020-01-07T09:26:53Z INFO : Use temporary dir: /tmp/shell-operator
2020-01-07T09:26:53Z INFO : Initialize hooks manager ...
2020-01-07T09:26:53Z INFO : Search and load hooks ...
2020-01-07T09:26:53Z INFO : Load hook config from '/hooks/kubesphere/installRunner.py'
2020-01-07T09:26:53Z INFO : Initializing schedule manager ...
2020-01-07T09:26:53Z INFO : KUBE Init Kubernetes client
2020-01-07T09:26:53Z INFO : KUBE-INIT Kubernetes client is configured successfully
2020-01-07T09:26:53Z INFO : MAIN: run main loop
2020-01-07T09:26:53Z INFO : MAIN: add onStartup tasks
2020-01-07T09:26:53Z INFO : Running schedule manager ...
2020-01-07T09:26:53Z INFO : QUEUE add all HookRun@OnStartup
2020-01-07T09:26:53Z INFO : MSTOR Create new metric shell_operator_live_ticks
2020-01-07T09:26:53Z INFO : MSTOR Create new metric shell_operator_tasks_queue_length
2020-01-07T09:26:53Z ERROR : error getting GVR for kind 'ConfigMap': unable to retrieve the complete list of server APIs: custom.metrics.k8s.io/v1beta1: the server is currently unable to handle the request
2020-01-07T09:26:53Z ERROR : Enable kube events for hooks error: unable to retrieve the complete list of server APIs: custom.metrics.k8s.io/v1beta1: the server is currently unable to handle the request
2020-01-07T09:26:56Z INFO : TASK_RUN Exit: program halts.`
Pod Events信息:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 29m default-scheduler Successfully assigned kubesphere-system/ks-installer-76b7888579-hk7md to cn-zhangjiakou.10.2.2.145
Normal Created 27m (x4 over 28m) kubelet, cn-zhangjiakou.10.2.2.145 Created container installer
Normal Started 27m (x4 over 28m) kubelet, cn-zhangjiakou.10.2.2.145 Started container installer
Normal Pulling 26m (x5 over 29m) kubelet, cn-zhangjiakou.10.2.2.145 Pulling image "kubesphere/ks-installer:v2.1.0"
Normal Pulled 26m (x5 over 28m) kubelet, cn-zhangjiakou.10.2.2.145 Successfully pulled image "kubesphere/ks-installer:v2.1.0"
Warning BackOff 3m49s (x105 over 28m) kubelet, cn-zhangjiakou.10.2.2.145 Back-off restarting failed container