Coredns不停重启

环境信息:
RKE2 版本:
v1.27.10+rke2r1

节点 CPU 架构,操作系统和版本:
amd64

日志

Readiness probe failed: Get “http://10.42.6.112:8181/ready”: context deadline exceeded (Client.Timeout exceeded while awaiting headers)

该服务不停重启,报上面错误,请问我应该如何解决和处理?

这是因为健康检查没通过,得用 kubectl logs 来确认为什么没启动成功


错误内容如图

CrashLoopBackOff (back-off 5m0s restarting failed container=coredns pod=rke2-coredns-rke2-coredns-7cd88fbc96-b8b6w_kube-system(f91dd344-468d-4f61-89eb-274abc04c556)) | Last state: Terminated with 137: OOMKilled, started: Wed, Jul 10 2024 2:56:42 pm, finished: Wed, Jul 10 2024 2:57:54 pm

tail -f /var/log/messages
Jul 10 20:37:56 node73 kernel: memory+swap: usage 524288kB, limit 9007199254740988kB, failcnt 0
Jul 10 20:37:56 node73 kernel: kmem: usage 0kB, limit 9007199254740988kB, failcnt 0
Jul 10 20:37:56 node73 kernel: Memory cgroup stats for /kubepods/poda94fe6b6-9f1d-40ee-812f-adabde491861: cache:0KB rss:0KB rss_huge:0KB mapped_file:0KB swap:0KB inactive_anon:0KB active_anon:0KB inactive_file:0KB active_file:0KB unevictable:0KB
Jul 10 20:37:56 node73 kernel: Memory cgroup stats for /kubepods/poda94fe6b6-9f1d-40ee-812f-adabde491861/5ec388516f20bb0d06833fbf184658efc78e1f75b4e667ffb7065d037596b7a5: cache:0KB rss:36KB rss_huge:0KB mapped_file:0KB swap:0KB inactive_anon:0KB active_anon:36KB inactive_file:0KB active_file:0KB unevictable:0KB
Jul 10 20:37:56 node73 kernel: Memory cgroup stats for /kubepods/poda94fe6b6-9f1d-40ee-812f-adabde491861/5bed9d9c965134503523f69392e1b10d78be7086542d1ab323a0a2565ddf4763: cache:0KB rss:524252KB rss_huge:2048KB mapped_file:0KB swap:0KB inactive_anon:0KB active_anon:524072KB inactive_file:0KB active_file:0KB unevictable:0KB
Jul 10 20:37:56 node73 kernel: [ pid ] uid tgid total_vm rss nr_ptes swapents oom_score_adj name
Jul 10 20:37:56 node73 kernel: [29016] 65535 29016 239 1 3 0 -998 pause
Jul 10 20:37:56 node73 kernel: [46191] 0 46191 311395 135501 301 0 -997 coredns
Jul 10 20:37:56 node73 kernel: Memory cgroup out of memory: Kill process 53890 (coredns) score 39 or sacrifice child
Jul 10 20:37:56 node73 kernel: Killed process 46191 (coredns), UID 0, total-vm:1245580kB, anon-rss:522928kB, file-rss:19076kB, shmem-rss:0kB