Docker 尝试在Raspberry Pi 3B+上运行OpenFaas函数时,获取ImageInspectError;

Docker 尝试在Raspberry Pi 3B+上运行OpenFaas函数时,获取ImageInspectError;,docker,kubernetes,raspberry-pi3,faas,openfaas,Docker,Kubernetes,Raspberry Pi3,Faas,Openfaas,我正试图在2 Raspberry Pi 3B+上部署一个函数和一个kubernetes集群。 不幸的是,应该处理函数的pod将进入ImageInspectError状态。。。 我尝试直接使用Docker运行函数,该函数包含在Docker图像中,一切正常 我在OpenFaasGitHub上打开了一个应用程序,维护人员告诉我直接向Kubernetes社区询问一些线索 我的第一个问题是:ImageInspectError是什么意思?它来自哪里 以下是我掌握的所有信息: 预期行为 Pod应该运行 当前行

我正试图在2 Raspberry Pi 3B+上部署一个函数和一个kubernetes集群。 不幸的是,应该处理函数的pod将进入
ImageInspectError
状态。。。 我尝试直接使用Docker运行函数,该函数包含在Docker图像中,一切正常

我在OpenFaasGitHub上打开了一个应用程序,维护人员告诉我直接向Kubernetes社区询问一些线索

我的第一个问题是:ImageInspectError是什么意思?它来自哪里

以下是我掌握的所有信息:

预期行为 Pod应该运行

当前行为
testfaceraspi
没有运行

pod中的日志:

$ kubectl logs testfaceraspi-7f6fcb5897-rs4cq -n openfaas-fn
Error from server (BadRequest): container "testfaceraspi" in pod "testfaceraspi-7f6fcb5897-rs4cq" is waiting to start: ImageInspectError
Pod描述:

$ kubectl describe pod -n openfaas-fn  testfaceraspi-7f6fcb5897-rs4cq 
Name:           testfaceraspi-7f6fcb5897-rs4cq
Namespace:      openfaas-fn
Node:           workernode/10.192.79.198
Start Time:     Thu, 12 Jul 2018 11:39:05 +0200
Labels:         faas_function=testfaceraspi
                pod-template-hash=3929761453
Annotations:    prometheus.io.scrape=false
Status:         Pending
IP:             10.40.0.16
Controlled By:  ReplicaSet/testfaceraspi-7f6fcb5897
Containers:
  testfaceraspi:
    Container ID:   
    Image:          gallouche/testfaceraspi
    Image ID:       
    Port:           8080/TCP
    Host Port:      0/TCP
    State:          Waiting
      Reason:       ImageInspectError
    Ready:          False
    Restart Count:  0
    Liveness:       exec [cat /tmp/.lock] delay=3s timeout=1s period=10s #success=1 #failure=3
    Readiness:      exec [cat /tmp/.lock] delay=3s timeout=1s period=10s #success=1 #failure=3
    Environment:
      fprocess:  python3 index.py
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-5qhnn (ro)
Conditions:
  Type           Status
  Initialized    True 
  Ready          False 
  PodScheduled   True 
Volumes:
  default-token-5qhnn:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-5qhnn
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  <none>
Tolerations:     node.kubernetes.io/not-ready:NoExecute for 300s
                 node.kubernetes.io/unreachable:NoExecute for 300s
Events:
  Type     Reason            Age                 From                 Message
  ----     ------            ----                ----                 -------
  Warning  DNSConfigForming  2m (x1019 over 3h)  kubelet, workernode  Search Line limits were exceeded, some search paths have been omitted, the applied search line is: openfaas-fn.svc.cluster.local svc.cluster.local cluster.local heig-vd.ch einet.ad.eivd.ch web.ad.eivd.ch
复制步骤(针对bug)
  • 在2节点k8s群集上部署OpenFaas
  • 使用faas new testfaceraspi--lang python3 armhf创建函数
  • handler.py
    中添加以下代码:

    import json
    def handle(req):
        jsonl = json.loads(req)
    
        return ("Found " + str(jsonl["nbFaces"]) + " faces in OpenFaas Function on raspi !")
    
  • .yml
    供应商: 姓名:faas 网关:

  • 运行faas构建-f testfacepi.yml

  • 使用docker登录名登录DockerHub
  • 运行faas push-f testfacepi.yml
  • 运行faas部署-f testfacepi.yml
  • 你的环境
    • FaaS CLI版本(完整输出自:
      FaaS CLI版本
      ):

    • Docker版本(完整输出自:
      Docker版本
      ):

    • 操作系统和版本(如Linux、Windows、MacOS):

    提前谢谢,如果你需要更多的信息,请告诉我


    Gallouche

    我看到这个错误是因为Kubernetes不支持docker版本。从Kubernetes版本1.11开始,支持的版本为1.11.2至1.13.1和17.03.x


    我无法使用OpenFaaS测试解决方案。

    好的,谢谢,我会看一看这一点,但与我讨论的其他一些人能够正确使用相同的配置。
    $ kubectl get events --sort-by=.metadata.creationTimestamp -n openfaas-fn
    LAST SEEN   FIRST SEEN   COUNT     NAME                                              KIND         SUBOBJECT                        TYPE      REASON                  SOURCE                  MESSAGE
    14m         1h           347       testfaceraspi-7f6fcb5897-rs4cq.1540db41e89d4c52   Pod                                           Warning   DNSConfigForming        kubelet, workernode     Search Line limits were exceeded, some search paths have been omitted, the applied search line is: openfaas-fn.svc.cluster.local svc.cluster.local cluster.local heig-vd.ch einet.ad.eivd.ch web.ad.eivd.ch
    4m          1h           75        figlet-7f556fcd87-wrtf4.1540db421002b49e          Pod                                           Warning   DNSConfigForming        kubelet, workernode     Search Line limits were exceeded, some search paths have been omitted, the applied search line is: openfaas-fn.svc.cluster.local svc.cluster.local cluster.local heig-vd.ch einet.ad.eivd.ch web.ad.eivd.ch
    10m         10m          1         testfaceraspi-7f6fcb5897-d6z78.1540df9ed8b91865   Pod                                           Normal    Scheduled               default-scheduler       Successfully assigned testfaceraspi-7f6fcb5897-d6z78 to workernode
    10m         10m          1         testfaceraspi-7f6fcb5897.1540df9ed6eee11f         ReplicaSet                                    Normal    SuccessfulCreate        replicaset-controller   Created pod: testfaceraspi-7f6fcb5897-d6z78
    10m         10m          1         testfaceraspi-7f6fcb5897-d6z78.1540df9eef3ef504   Pod                                           Normal    SuccessfulMountVolume   kubelet, workernode     MountVolume.SetUp succeeded for volume "default-token-5qhnn" 
    4m          10m          27        testfaceraspi-7f6fcb5897-d6z78.1540df9eef5445c0   Pod                                           Warning   DNSConfigForming        kubelet, workernode     Search Line limits were exceeded, some search paths have been omitted, the applied search line is: openfaas-fn.svc.cluster.local svc.cluster.local cluster.local heig-vd.ch einet.ad.eivd.ch web.ad.eivd.ch
    8m          9m           8         testfaceraspi-7f6fcb5897-d6z78.1540df9f670d0dad   Pod          spec.containers{testfaceraspi}   Warning   InspectFailed           kubelet, workernode     Failed to inspect image "gallouche/testfaceraspi": rpc error: code = Unknown desc = Error response from daemon: readlink /var/lib/docker/overlay2/l: invalid argument
    9m          9m           7         testfaceraspi-7f6fcb5897-d6z78.1540df9f670fcf3e   Pod          spec.containers{testfaceraspi}   Warning   Failed                  kubelet, workernode     Error: ImageInspectError
    
    import json
    def handle(req):
        jsonl = json.loads(req)
    
        return ("Found " + str(jsonl["nbFaces"]) + " faces in OpenFaas Function on raspi !")
    
    functions:
      testfaceraspi:
        lang: python3-armhf
        handler: ./testfaceraspi
        image: gallouche/testfaceraspi
    
    Commit: 3995a8197f1df1ecdf524844477cffa04e4690ea
    Version: 0.6.11
    
    Client:
     Version:       18.04.0-ce
     API version:   1.37
     Go version:    go1.9.4
     Git commit:    3d479c0
     Built: Tue Apr 10 18:25:24 2018
     OS/Arch:       linux/arm
     Experimental:  false
     Orchestrator:  swarm
    
     Server:
     Engine:
      Version:      18.04.0-ce
      API version:  1.37 (minimum version 1.12)
      Go version:   go1.9.4
      Git commit:   3d479c0
      Built:        Tue Apr 10 18:21:25 2018
      OS/Arch:      linux/arm
      Experimental: false
    
    Distributor ID: Raspbian
    Description:    Raspbian GNU/Linux 9.4 (stretch)
    Release:        9.4
    Codename:       stretch