promethues оператор alertmanager-main-0 ожидает и отображает - PullRequest
0 голосов
/ 05 ноября 2019

Что случилось? kubernetes версия: 1.12 оператор Прометуса: выпуск-0.1 Я следую README:

$ kubectl create -f manifests/

# It can take a few seconds for the above 'create manifests' command to fully create the following resources, so verify the resources are ready before proceeding.
$ until kubectl get customresourcedefinitions servicemonitors.monitoring.coreos.com ; do date; sleep 1; echo ""; done
$ until kubectl get servicemonitors --all-namespaces ; do date; sleep 1; echo ""; done

$ kubectl apply -f manifests/ # This command sometimes may need to be done twice (to workaround a race condition).

, а затем я использую команду, а затем отображается как:

[root@VM_8_3_centos /data/hansenwu/kube-prometheus/manifests]# kubectl get pod -n monitoring
NAME                                  READY   STATUS    RESTARTS   AGE
alertmanager-main-0                   2/2     Running   0          66s
alertmanager-main-1                   1/2     Running   0          47s
grafana-54f84fdf45-kt2j9              1/1     Running   0          72s
kube-state-metrics-65b8dbf498-h7d8g   4/4     Running   0          57s
node-exporter-7mpjw                   2/2     Running   0          72s
node-exporter-crfgv                   2/2     Running   0          72s
node-exporter-l7s9g                   2/2     Running   0          72s
node-exporter-lqpns                   2/2     Running   0          72s
prometheus-adapter-5b6f856dbc-ndfwl   1/1     Running   0          72s
prometheus-k8s-0                      3/3     Running   1          59s
prometheus-k8s-1                      3/3     Running   1          59s
prometheus-operator-5c64c8969-lqvkb   1/1     Running   0          72s
[root@VM_8_3_centos /data/hansenwu/kube-prometheus/manifests]# kubectl get pod -n monitoring
NAME                                  READY   STATUS    RESTARTS   AGE
alertmanager-main-0                   0/2     Pending   0          0s
grafana-54f84fdf45-kt2j9              1/1     Running   0          75s
kube-state-metrics-65b8dbf498-h7d8g   4/4     Running   0          60s
node-exporter-7mpjw                   2/2     Running   0          75s
node-exporter-crfgv                   2/2     Running   0          75s
node-exporter-l7s9g                   2/2     Running   0          75s
node-exporter-lqpns                   2/2     Running   0          75s
prometheus-adapter-5b6f856dbc-ndfwl   1/1     Running   0          75s
prometheus-k8s-0                      3/3     Running   1          62s
prometheus-k8s-1                      3/3     Running   1          62s
prometheus-operator-5c64c8969-lqvkb   1/1     Running   0          75s

Я не знаю, почему pod altertmanager-main-0 ожидает и отключается, а затем перезапускается. И я вижу событие, оно показывается как:

72s         Warning   FailedCreate             StatefulSet   create Pod alertmanager-main-0 in StatefulSet alertmanager-main failed error: The POST operation against Pod could not be completed at this time, please try again.
72s         Warning   FailedCreate             StatefulSet   create Pod alertmanager-main-0 in StatefulSet alertmanager-main failed error: The POST operation against Pod could not be completed at this time, please try again.
72s         Warning^Z   FailedCreate             StatefulSet
[10]+  Stopped                 kubectl get events -n monitoring

1 Ответ

1 голос
/ 05 ноября 2019

Скорее всего, у диспетчера предупреждений недостаточно времени для правильного запуска.

Посмотрите на этот ответ: https://github.com/coreos/prometheus-operator/issues/965#issuecomment-460223268

Вы можете установить в поле паузы значение true, а затем изменитьStatefulSet, чтобы попытаться, если расширение жизнеспособности / готовности решит вашу проблему.

...