【问题标题】:kubernetes deployment- container not starting- error- InvalidImageNamekubernetes 部署 - 容器未启动 - 错误 - InvalidImageName
【发布时间】:2019-08-13 14:07:30
【问题描述】:

下面是Kubernetes部署yaml文件-container镜像部分:

image: https://registry.ng.bluemix.net/****/test-service:test-branch-67

imagePullPolicy: Always

以下是部署后的错误信息:

ubuntu@ip-xxxx:~$ kubectl logs test-deployment-69c6d8xxx -n test

来自服务器的错误(BadRequest):pod“test-deployment-ccccxxx”中的容器“test-deployment”正在等待启动:InvalidImageName

另一个错误日志:

无法应用默认图片标签“https://registry.ng.bluemix.net/test/test-service:test-branch-66”:无法解析图片引用“https://registry.ng.bluemix.net/test/test-service:test-branch-66”:引用格式无效

知道为什么 pod 没有出现吗?

【问题讨论】:

    标签: deployment kubernetes containers ibm-cloud bluemix-app-scan


    【解决方案1】:

    从镜像名称中删除https://,如果您使用的是私有注册表,请确保使用imagePullSecrets

    【讨论】:

      【解决方案2】:

      请添加您的完整部署文件以详细了解问题。但是查看文件确保您没有丢失

      imagePullSecrets(添加有权从存储库中提取图像的有效凭据)

      你也不需要像你添加的那样提供协议

      https

      您在 yml 中的图像字段应如下例所示:

      图像:存储库:组织名称/图像名称:图像版本

      【讨论】:

        【解决方案3】:
        
        curl --insecure -sfL https://192.168.2.217/v3/import/zc2t5qstv4l9f6wv8stmfsqcks47x7z5m4xnnrbf7hn9c9vj65bwd7_c-4mdds.yaml  > tmp.yaml
        
        # edit tmp.yaml file and delete https:/hub.docker.com/rancher/rancher-agent:v2.5.7 => rancher/rancher-agent:v2.5.7
        # apply again:
        kubectl apply -f tmp.yaml
        

        【讨论】:

          【解决方案4】:

          这可能是因为在您的 YAML 文件中您的图像名称错误,可能是缺少标记,您可以从那里进行跟踪。

          【讨论】:

            猜你喜欢
            • 1970-01-01
            • 2020-09-15
            • 2020-07-08
            • 2020-02-14
            • 2021-09-13
            • 1970-01-01
            • 2022-12-17
            • 2019-08-24
            • 2017-08-24
            相关资源
            最近更新 更多