【问题标题】:K8S - Docker - ARM unbutu 64bits - qemu: uncaught target signal 11 (Segmentation fault) - core dumpedK8S - Docker - ARM unbutu 64 位 - qemu:未捕获的目标信号 11(分段错误) - 核心转储
【发布时间】:2020-07-20 20:59:12
【问题描述】:

我在我的 4 raspberry pi 4 上安装了一个 K8S 集群,带有 2gb 的 RAM 和 32gb 的 SD 卡。

在我的主节点和从节点上,我安装了 qemu binfmt-support qemu-user-static,以便为 Docker 映像启用 ARM CPU 支持。

我尝试安装 Grafana 和 Prometheus 以通过以下方式监控集群:

kubectl apply --filename https://raw.githubusercontent.com/giantswarm/prometheus/master/manifests-all.yaml

但 pod prometheus-node-exporter 失败,状态为 CrashLoopBackOff

当我检查日志kubectl logs prometheus-node-exporter-dn8t9 -n monitoring 时,我收到了错误qemu: uncaught target signal 11 (Segmentation fault) - core dumped

而且我不知道如何解决这个问题或从哪里开始寻找。

有人可以帮忙吗?

【问题讨论】:

    标签: docker kubernetes raspberry-pi arm


    【解决方案1】:

    我查看了这个?并看到?,因为您在树莓派 4 上运行,您的架构可能是 aarch64 (arm64)。因此,似乎 node-exporter DaemonSet K8s 清单正在拉取以下图像:prom/node-exporter:v0.14.0,我查看了dockerhub and that image tag doesn't have the aarch64 architecture tag,因此很可能拉动amd64 版本导致节点上的qemu 在您的案例。

    您还可以看到有一个arm64 image starting with prom/node-exporter:v0.18.0。因此,您可以尝试下载编辑 node-exporter 容器的文件以使用 v0.18.0,这应该可以解决该容器的问题。您可能还需要更新具有匹配 arm64 架构的其他容器。

    ?‍♀️?‍♂️?

    $ wget https://raw.githubusercontent.com/giantswarm/prometheus/master/manifests-all.yaml
    

    然后改变:

    ...
    apiVersion: apps/v1
    kind: DaemonSet
    metadata:
      name: prometheus-node-exporter
      namespace: monitoring
      labels:
        app: prometheus
        component: node-exporter
    spec:
      selector:
        matchLabels:
          app: prometheus
      template:
        metadata:
          name: prometheus-node-exporter
          labels:
            app: prometheus
            component: node-exporter
        spec:
          containers:
          - image: prom/node-exporter:v0.18.0 ? Change here
            name: prometheus-node-exporter
            ports:
            - name: prom-node-exp
              #^ must be an IANA_SVC_NAME (at most 15 characters, ..)
              containerPort: 9100
              hostPort: 9100
          hostNetwork: true
          hostPID: true
    ...
    

    ✌️

    【讨论】:

    • 谢谢,就是这样,我在grafana-core上遇到了同样的错误,因为没有交叉编译的过时版本:)非常感谢
    猜你喜欢
    • 2019-07-11
    • 1970-01-01
    • 2023-01-30
    • 2020-05-16
    • 2023-01-31
    • 2021-07-24
    • 1970-01-01
    • 2013-05-15
    • 2013-06-21
    相关资源
    最近更新 更多