k8s版本
[root@k8s-test-node01 ~]# kubectl version
Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.2", GitCommit:"c97fe5036ef3df2967d086711e6c0c405941e14b", GitTreeState:"clean", BuildDate:"2019-10-15T19:18:23Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.2", GitCommit:"c97fe5036ef3df2967d086711e6c0c405941e14b", GitTreeState:"clean", BuildDate:"2019-10-15T19:09:08Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}
helm版本
[root@k8s-test-node01 ~]# helm version
Client: &version.Version{SemVer:"v2.16.3", GitCommit:"1ee0254c86d4ed6887327dabed7aa7da29d7eb0d", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.16.1", GitCommit:"bbdfe5e7803a12bbdf97e94cd847859890cf4050", GitTreeState:"clean"}
pod状态
Tolerations: node.kubernetes.io/not-ready:NoExecute for 360s
node.kubernetes.io/unreachable:NoExecute for 360s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled <unknown> default-scheduler Successfully assigned kubesphere-system/ks-installer-75b8d89dff-tc8lj to k8s-test-node03
Normal Started 47m (x4 over 48m) kubelet, k8s-test-node03 Started container installer
Normal Pulling 46m (x5 over 48m) kubelet, k8s-test-node03 Pulling image "kubesphere/ks-installer:v2.1.1"
Normal Pulled 46m (x5 over 48m) kubelet, k8s-test-node03 Successfully pulled image "kubesphere/ks-installer:v2.1.1"
Normal Created 46m (x5 over 48m) kubelet, k8s-test-node03 Created container installer
Warning BackOff 3m36s (x200 over 48m) kubelet, k8s-test-node03 Back-off restarting failed container
报错日志:
2020-05-04T08:35:12Z INFO : shell-operator v1.0.0-beta.5
2020-05-04T08:35:12Z INFO : Use temporary dir: /tmp/shell-operator
2020-05-04T08:35:12Z INFO : Initialize hooks manager ...
2020-05-04T08:35:12Z INFO : Search and load hooks ...
2020-05-04T08:35:12Z INFO : Load hook config from '/hooks/kubesphere/installRunner.py'
2020-05-04T08:35:12Z INFO : HTTP SERVER Listening on 0.0.0.0:9115
2020-05-04T08:35:12Z INFO : Initializing schedule manager ...
2020-05-04T08:35:12Z INFO : KUBE Init Kubernetes client
2020-05-04T08:35:12Z INFO : KUBE-INIT Kubernetes client is configured successfully
2020-05-04T08:35:12Z INFO : MAIN: run main loop
2020-05-04T08:35:12Z INFO : MAIN: add onStartup tasks
2020-05-04T08:35:12Z INFO : Running schedule manager ...
2020-05-04T08:35:12Z INFO : QUEUE add all HookRun@OnStartup
2020-05-04T08:35:12Z INFO : MSTOR Create new metric shell_operator_live_ticks
2020-05-04T08:35:12Z INFO : MSTOR Create new metric shell_operator_tasks_queue_length
2020-05-04T08:35:12Z ERROR : error getting GVR for kind 'ConfigMap': unable to retrieve the complete list of server APIs: metrics.k8s.io/v1beta1: an error on the server ("Internal Server Error: \"/apis/metrics.k8s.io/v1beta1?timeout=32s\": subjectaccessreviews.authorization.k8s.io is forbidden: User \"system:serviceaccount:kube-system:metrics-server\" cannot create resource \"subjectaccessreviews\" in API group \"authorization.k8s.io\" at the cluster scope") has prevented the request from succeeding
2020-05-04T08:35:12Z ERROR : Enable kube events for hooks error: unable to retrieve the complete list of server APIs: metrics.k8s.io/v1beta1: an error on the server ("Internal Server Error: \"/apis/metrics.k8s.io/v1beta1?timeout=32s\": subjectaccessreviews.authorization.k8s.io is forbidden: User \"system:serviceaccount:kube-system:metrics-server\" cannot create resource \"subjectaccessreviews\" in API group \"authorization.k8s.io\" at the cluster scope") has prevented the request from succeeding
2020-05-04T08:35:15Z INFO : TASK_RUN Exit: program halts.
看样子是metrics-server权限问题?