当前位置: 首页 > 知识库问答 >
问题:

系统错误:exec:“deployment”:在$PATH中找不到可执行文件

印子平
2023-03-14

我完全按照这个例子,[http://kubernetes.io/docs/hellonode/,]

在我运行[kubectl run hello-node--image=gcr.io/project_id/hello-node:v1--port=8080 deployment“hello-node”created]之后。pod运行不正常,我得到了CrashLoopBackOff状态,我没有部署执行,

欢迎任何评论。



norbert688@kubernete-codelab-1264:~/hellonode$ kubectl  get pods
NAME                          READY     STATUS             RESTARTS   AGE
hello-node-2129762707-hte0f   0/1       CrashLoopBackOff   5          6m





norbert688@kubernete-codelab-1264:~/hellonode$ kubectl  describe  pod  hello
Name:           hello-node-2129762707-hte0f
Namespace:      default
Node:           gke-hello-world-16359f5d-node-zkpf/10.140.0.3
Start Time:     Mon, 28 Mar 2016 20:07:53 +0800
Labels:         pod-template-hash=2129762707,run=hello-node
Status:         Running
IP:             10.16.2.3
Controllers:    ReplicaSet/hello-node-2129762707
Containers:
  hello-node:
    Container ID:       docker://dfae3b1e068a5b0e89b1791f1acac56148fc649ea5894d36575ce3cd46a2ae3d
    Image:              gcr.io/kubernete-codelab-1264/hello-node:v1
    Image ID:           docker://1fab5e6a9ef21db5518db9bcfbafa52799c38609738f5b3e1c4bb875225b5d61
    Port:               8080/TCP
    Args:
      deployment
      hello-node
      created
    QoS Tier:
      cpu:      Burstable
      memory:   BestEffort
    Requests:
      cpu:              100m
    State:              Waiting
      Reason:           CrashLoopBackOff
    Last State:         Terminated
      Reason:           ContainerCannotRun
      Message:          [8] System error: exec: "deployment": executable file not found in $PATH
      Exit Code:        -1
      Started:          Mon, 28 Mar 2016 20:14:16 +0800
      Finished:         Mon, 28 Mar 2016 20:14:16 +0800
    Ready:              False
    Restart Count:      6
    Environment Variables:
Conditions:
  Type          Status
  Ready         False 
Volumes:
  default-token-k3zl5:
    Type:       Secret (a volume populated by a Secret)
    SecretName: default-token-k3zl5
Events:
  FirstSeen     LastSeen        Count   From                                            SubobjectPath                   Type            Reason          Message
  ---------     --------        -----   ----                                            -------------                   --------        ------          -------
  6m            6m              1       {kubelet gke-hello-world-16359f5d-node-zkpf}    spec.containers{hello-node}     Normal          Pulling         pulling image "gcr.io/kubernete-codelab-1264/hello-node:v1"
  6m            6m              1       {default-scheduler }                                                            Normal          Scheduled       Successfully assigned hello-node-2129762707-hte0f to gke-hello-world-16359f5d-node-zkpf
  6m            6m              1       {kubelet gke-hello-world-16359f5d-node-zkpf}    spec.containers{hello-node}     Normal          Created         Created container with docker id 41c8fde8f94b
  6m            6m              1       {kubelet gke-hello-world-16359f5d-node-zkpf}    spec.containers{hello-node}     Warning         Failed          Failed to start container with docker id 41c8fde8f94b with error: API error (500): Cannot start container 41c8fde8f94bee697e3f1a3af88e6b347f5b850d9a6a406a5c2e25375e48c87a: [8] System error: exec: "deployment": executable file not found in $PATH

  6m    6m      1       {kubelet gke-hello-world-16359f5d-node-zkpf}            Warning FailedSync      Error syncing pod, skipping: failed to "StartContainer" for "hello-node" with RunContainerError: "runContainer: API error (500): Cannot start container 41c8fde8f94bee697e3f1a3af88e6b347f5b850d9a6a406a5c2e25375e48c87a: [8] System error: exec: \"deployment\": executable file not found in $PATH\n"

  6m    6m      1       {kubelet gke-hello-world-16359f5d-node-zkpf}    spec.containers{hello-node}     Normal  Created Created container with docker id a99c8dc5cc8a
  6m    6m      1       {kubelet gke-hello-world-16359f5d-node-zkpf}    spec.containers{hello-node}     Warning Failed  Failed to start container with docker id a99c8dc5cc8a with error: API error (500): Cannot start container a99c8dc5cc8a884d35f7c69e9e1ba91643f9e9ef8815b95f80aabdf9995a6608: [8] System error: exec: "deployment": executable file not found in $PATH

  6m    6m      1       {kubelet gke-hello-world-16359f5d-node-zkpf}            Warning FailedSync      Error syncing pod, skipping: failed to "StartContainer" for "hello-node" with RunContainerError: "runContainer: API error (500): Cannot start container a99c8dc5cc8a884d35f7c69e9e1ba91643f9e9ef8815b95f80aabdf9995a6608: [8] System error: exec: \"deployment\": executable file not found in $PATH\n"

  6m    6m      1       {kubelet gke-hello-world-16359f5d-node-zkpf}    spec.containers{hello-node}     Normal  Pulled          Successfully pulled image "gcr.io/kubernete-codelab-1264/hello-node:v1"
  6m    6m      1       {kubelet gke-hello-world-16359f5d-node-zkpf}                                    Warning FailedSync      Error syncing pod, skipping: failed to "StartContainer" for "hello-node" with RunContainerError: "runContainer: API error (500): Cannot start container 977b07a9e5dea5256de4e600d6071e3ac5cc6e9a344cb5354851aab587bff952: [8] System error: exec: \"deployment\": executable file not found in $PATH\n"

  6m    6m      1       {kubelet gke-hello-world-16359f5d-node-zkpf}    spec.containers{hello-node}     Normal  Created Created container with docker id 977b07a9e5de
  6m    6m      1       {kubelet gke-hello-world-16359f5d-node-zkpf}    spec.containers{hello-node}     Warning Failed  Failed to start container with docker id 977b07a9e5de with error: API error (500): Cannot start container 977b07a9e5dea5256de4e600d6071e3ac5cc6e9a344cb5354851aab587bff952: [8] System error: exec: "deployment": executable file not found in $PATH

  5m    5m      1       {kubelet gke-hello-world-16359f5d-node-zkpf}            Warning FailedSync      Error syncing pod, skipping: failed to "StartContainer" for "hello-node" with CrashLoopBackOff: "Back-off 20s restarting failed container=hello-node pod=hello-node-2129762707-hte0f_default(b300b749-f4dd-11e5-83ee-42010af0000e)"

  5m    5m      1       {kubelet gke-hello-world-16359f5d-node-zkpf}    spec.containers{hello-node}     Normal  Created Created container with docker id f8ad177306bc
  5m    5m      1       {kubelet gke-hello-world-16359f5d-node-zkpf}    spec.containers{hello-node}     Warning Failed  Failed to start container with docker id f8ad177306bc with error: API error (500): Cannot start container f8ad177306bc6154498befbbc876ee4b2334d3842f269f4579f762434effe33a: [8] System error: exec: "deployment": executable file not found in $PATH

  5m    5m      1       {kubelet gke-hello-world-16359f5d-node-zkpf}            Warning FailedSync      Error syncing pod, skipping: failed to "StartContainer" for "hello-node" with RunContainerError: "runContainer: API error (500): Cannot start container f8ad177306bc6154498befbbc876ee4b2334d3842f269f4579f762434effe33a: [8] System error: exec: \"deployment\": executable file not found in $PATH\n"

  5m    4m      3       {kubelet gke-hello-world-16359f5d-node-zkpf}            Warning FailedSync      Error syncing pod, skipping: failed to "StartContainer" for "hello-node" with CrashLoopBackOff: "Back-off 40s restarting failed container=hello-node pod=hello-node-2129762707-hte0f_default(b300b749-f4dd-11e5-83ee-42010af0000e)"

  4m    4m      1       {kubelet gke-hello-world-16359f5d-node-zkpf}            Warning FailedSync      Error syncing pod, skipping: failed to "StartContainer" for "hello-node" with RunContainerError: "runContainer: API error (500): Cannot start container d9218f5385cb020c752c9e78e3eda87f04fa0428cba92d14a1a73c93a01c8d5b: [8] System error: exec: \"deployment\": executable file not found in $PATH\n"

  4m    4m      1       {kubelet gke-hello-world-16359f5d-node-zkpf}    spec.containers{hello-node}     Normal  Created Created container with docker id d9218f5385cb
  4m    4m      1       {kubelet gke-hello-world-16359f5d-node-zkpf}    spec.containers{hello-node}     Warning Failed  Failed to start container with docker id d9218f5385cb with error: API error (500): Cannot start container d9218f5385cb020c752c9e78e3eda87f04fa0428cba92d14a1a73c93a01c8d5b: [8] System error: exec: "deployment": executable file not found in $PATH

  4m    3m      7       {kubelet gke-hello-world-16359f5d-node-zkpf}            Warning FailedSync      Error syncing pod, skipping: failed to "StartContainer" for "hello-node" with CrashLoopBackOff: "Back-off 1m20s restarting failed container=hello-node pod=hello-node-2129762707-hte0f_default(b300b749-f4dd-11e5-83ee-42010af0000e)"

  3m    3m      1       {kubelet gke-hello-world-16359f5d-node-zkpf}            Warning FailedSync      Error syncing pod, skipping: failed to "StartContainer" for "hello-node" with RunContainerError: "runContainer: API error (500): Cannot start container 7c3c680f18c4cb7fa0fd02f538dcbf2e8f8ba94661fe2703c2fb42ed0c908f59: [8] System error: exec: \"deployment\": executable file not found in $PATH\n"

  3m    3m      1       {kubelet gke-hello-world-16359f5d-node-zkpf}    spec.containers{hello-node}     Warning Failed  Failed to start container with docker id 7c3c680f18c4 with error: API error (500): Cannot start container 7c3c680f18c4cb7fa0fd02f538dcbf2e8f8ba94661fe2703c2fb42ed0c908f59: [8] System error: exec: "deployment": executable file not found in $PATH

  3m    3m      1       {kubelet gke-hello-world-16359f5d-node-zkpf}    spec.containers{hello-node}     Normal  Created         Created container with docker id 7c3c680f18c4
  2m    40s     12      {kubelet gke-hello-world-16359f5d-node-zkpf}                                    Warning FailedSync      Error syncing pod, skipping: failed to "StartContainer" for "hello-node" with CrashLoopBackOff: "Back-off 2m40s restarting failed container=hello-node pod=hello-node-2129762707-hte0f_default(b300b749-f4dd-11e5-83ee-42010af0000e)"

  26s   26s     1       {kubelet gke-hello-world-16359f5d-node-zkpf}    spec.containers{hello-node}     Warning Failed  Failed to start container with docker id dfae3b1e068a with error: API error (500): Cannot start container dfae3b1e068a5b0e89b1791f1acac56148fc649ea5894d36575ce3cd46a2ae3d: [8] System error: exec: "deployment": executable file not found in $PATH

  26s   26s     1       {kubelet gke-hello-world-16359f5d-node-zkpf}    spec.containers{hello-node}     Normal  Created         Created container with docker id dfae3b1e068a
  6m    26s     6       {kubelet gke-hello-world-16359f5d-node-zkpf}    spec.containers{hello-node}     Normal  Pulled          Container image "gcr.io/kubernete-codelab-1264/hello-node:v1" already present on machine
  3m    14s     3       {kubelet gke-hello-world-16359f5d-node-zkpf}                                    Warning FailedSync      (events with common reason combined)
  5m    3s      26      {kubelet gke-hello-world-16359f5d-node-zkpf}    spec.containers{hello-node}     Warning BackOff         Back-off restarting failed docker container
  3s    3s      1       {kubelet gke-hello-world-16359f5d-node-zkpf}                                    Warning FailedSync      Error syncing pod, skipping: failed to "StartContainer" for "hello-node" with CrashLoopBackOff: "Back-off 5m0s restarting failed container=hello-node pod=hello-node-2129762707-hte0f_default(b300b749-f4dd-11e5-83ee-42010af0000e)"

===============================================================

共有1个答案

诸葛奇玮
2023-03-14

运行[kubectl run hello-node--image=gcr.io/project_id/hello-node:v1--port=8080已创建部署“hello-node”]之后

您的意思是您的runkubectl run hello-node--image=gcr.io/project_id/hello-node:v1-port=8080部署“hello-node”created

如果是这种情况,那么就不奇怪了,因为deployment在您的路径中不是一个可执行文件。

 类似资料:
  • 我有一个docker映像,它安装了,但是当我试图运行它时,我得到了一个错误: 如果我在交互模式下运行bash,则可用。 我做错了什么? 这是我的Dockerfile:

  • 我有一个运行在Docker容器中的uwsgi服务,我想用它来服务django应用程序。当我在本地运行uwsgi服务时,一切正常,但是从docker容器中我得到消息和,django应用程序显示内部服务器错误。这是我的uwsgi.ini文件。在docker容器中,我使用类似于

  • 在Amazon SageMaker中,我试图部署一个带有Scikit学习模型的自定义创建的Docker容器,但是部署总是出错。 以下是我的步骤: > 在我的本地机器上创建了一个脚本(script.py),并分割了培训和测试数据。该脚本包含一个主要部分,接受参数“输出列车dir”、“模型dir”、“列车”和“测试”,并包含函数模型fn、输入fn、输出fn和预测fn 在本地测试了脚本,效果良好 pyt

  • 问题内容: 我有一个安装的docker映像,但是当我尝试运行它时,出现错误: 如果我以交互模式运行bash,则可用。 我究竟做错了什么? 这是我的Dockerfile: 问题答案: 当您将exec格式用于命令(例如,带双引号的JSON数组)时,将在 没有 外壳的 情况下 执行该命令。这意味着大多数环境变量将不存在。 如果您将命令指定为常规字符串(例如),则之后的字符串将使用来执行。 有关更多信息,

  • 我已经检查了垃圾箱,里面没有ping

  • 我在学docker。我尝试在docker,com上运行一个示例dockerfile。但我有一个问题是“来自守护进程的错误响应:OCI运行时创建失败:container\u linux.go:345:启动容器进程导致”exec:\“flask\”:在$PATH中找不到可执行文件“:未知”。 非常感谢。