Kubernetes 1.18 Предупреждение Ошибка ImageGCFailed не удалось получить информацию imageFs: невозможно найти данные в кеше памяти - PullRequest
1 голос
/ 26 мая 2020

Я установил свой Kubernetes 1.18 на Centos 7. Мы также используем настроенный CIDR, используя

kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version= $ (kubectl version | base64 | tr -d ' \ n ') & env.IPALLOC_RANGE = IPALLO C

Первоначально Kubernetes работал правильно. Но когда мы запускаем один и тот же под несколько раз для тестирования, Kubelet перезапускается каждые 5 секунд.

Когда я проверено,

Kubectl get events

7m43s       Normal    Starting                  node/rajasvm   Starting kubelet.
7m43s       Normal    NodeHasSufficientMemory   node/rajasvm   Node rajasvm status is now: NodeHasSufficientMemory
7m43s       Normal    NodeHasNoDiskPressure     node/rajasvm   Node rajasvm status is now: NodeHasNoDiskPressure
7m43s       Normal    NodeHasSufficientPID      node/rajasvm   Node rajasvm status is now: NodeHasSufficientPID
7m26s       Normal    Starting                  node/rajasvm   Starting kubelet.
7m26s       Normal    NodeHasSufficientMemory   node/rajasvm   Node rajasvm status is now: NodeHasSufficientMemory
7m26s       Normal    NodeHasNoDiskPressure     node/rajasvm   Node rajasvm status is now: NodeHasNoDiskPressure
7m26s       Normal    NodeHasSufficientPID      node/rajasvm   Node rajasvm status is now: NodeHasSufficientPID
7m9s        Normal    Starting                  node/rajasvm   Starting kubelet.
7m9s        Warning   ImageGCFailed             node/rajasvm   failed to get imageFs info: unable to find data in memory cache
6m52s       Normal    Starting                  node/rajasvm   Starting kubelet.
6m35s       Normal    Starting                  node/rajasvm   Starting kubelet.
6m35s       Normal    NodeHasSufficientMemory   node/rajasvm   Node rajasvm status is now: NodeHasSufficientMemory
6m35s       Normal    NodeHasNoDiskPressure     node/rajasvm   Node rajasvm status is now: NodeHasNoDiskPressure
6m35s       Normal    NodeHasSufficientPID      node/rajasvm   Node rajasvm status is now: NodeHasSufficientPID

journalctl -u kubelet | grep -i garbage

May 27 17:00:05 rajasvm kubelet[20241]: E0527 17:00:05.374190   20241 kubelet.go:1305] Image garbage collection failed once. Stats initialization may not have completed yet: failed to get imageFs info: unable to find data in memory cache
May 27 17:00:22 rajasvm kubelet[20401]: E0527 17:00:22.152485   20401 kubelet.go:1305] Image garbage collection failed once. Stats initialization may not have completed yet: failed to get imageFs info: unable to find data in memory cache
May 27 17:00:39 rajasvm kubelet[20548]: E0527 17:00:39.141443   20548 kubelet.go:1305] Image garbage collection failed once. Stats initialization may not have completed yet: failed to get imageFs info: unable to find data in memory cache
May 27 17:00:55 rajasvm kubelet[20693]: E0527 17:00:55.953994   20693 kubelet.go:1305] Image garbage collection failed once. Stats initialization may not have completed yet: failed to get imageFs info: unable to find data in memory cache
May 27 17:01:12 rajasvm kubelet[20848]: E0527 17:01:12.668267   20848 kubelet.go:1305] Image garbage collection failed once. Stats initialization may not have completed yet: failed to get imageFs info: unable to find data in memory cache
May 27 17:01:29 rajasvm kubelet[20994]: E0527 17:01:29.676793   20994 kubelet.go:1305] Image garbage collection failed once. Stats initialization may not have completed yet: failed to get imageFs info: unable to find data in memory cache
May 27 17:01:46 rajasvm kubelet[21136]: E0527 17:01:46.367956   21136 kubelet.go:1305] Image garbage collection failed once. Stats initialization may not have completed yet: failed to get imageFs info: unable to find data in memory cache
May 27 17:02:03 rajasvm kubelet[21282]: E0527 17:02:03.181850   21282 kubelet.go:1305] Image garbage collection failed once. Stats initialization may not have completed yet: failed to get imageFs info: unable to find data in memory cache
May 27 17:02:03 rajasvm kubelet[21282]: E0527 17:02:03.181865   21282 kubelet.go:1301] Image garbage collection failed multiple times in a row: failed to get imageFs info: unable to find data in memory cache

Пожалуйста, дайте мне знать, как решить эту проблему.

1 Ответ

1 голос
/ 26 мая 2020

У меня есть решение, похоже, удаленные docker изображения почему-то не очистились должным образом. Без понятия об этом. Но ниже решение сработало для меня

docker system prune
systemctl stop kubelet
systemctl stop docker
systemctl start docker
systemctl start kubelet
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...