gpt4 book ai didi

docker - 将简单的 docker 镜像部署到 openshift 的问题

转载 作者:行者123 更新时间:2023-12-02 21:22:07 25 4
gpt4 key购买 nike

我正在制作 Openshift Origin 最新版本的原型(prototype)。

操作系统:RHEL 7.3

docker :17.05.0-ce

oc v1.5.1+7b451fc

Kubernetes v1.5.2+43a9be4

  • 使用 sudo 用户
  • 完成安装
  • 使用 oc cluster up 启动 openshift
  • 以默认用户 developer
  • 登录 openshift
  • 尝试使用 oc new-app hello-world 部署 docker helloworld 应用程序
  • 二手 oc get pod获取状态
  • 状态为错误

  • NAME READY STATUS RESTARTS AGE

    hello-world-1-deploy 0/1 Error 0 57m


  • 使用 oc logs hello-world-1-deploy 检查了日志显示的错误是

  • error: open /var/run/secrets/kubernetes.io/serviceaccount/token: no such file or directory



    尝试谷歌并获得了很多类似的问题引用,大多数人说它已在最新版本(或类似答案)中修复。看起来像一个 kubernetes 问题,但仍然没有运气。作为一个新手是没有方向的。任何人都可以对这个错误给出一些想法。

    运行时发现错误 oc adm diagnostics
    [Note] Running diagnostic: DiagnosticPod
    Description: Create a pod to run diagnostics from the application standpoint

    ERROR: [DCli2012 from diagnostic DiagnosticPod@openshift/origin/pkg/diagnostics/client/run_diagnostics_pod.go:155]
    See the errors below in the output from the diagnostic pod:
    [Note] Running diagnostic: PodCheckAuth
    Description: Check that service account credentials authenticate as expected

    ERROR: [DP1001 from diagnostic PodCheckAuth@openshift/origin/pkg/diagnostics/pod/auth.go:53]
    could not read the service account token: open /var/run/secrets/kubernetes.io/serviceaccount/token: no such file or directory

    [Note] Running diagnostic: PodCheckDns
    Description: Check that DNS within a pod works as expected

    [Note] Summary of diagnostics execution (version v1.5.1+7b451fc):
    [Note] Errors seen: 1

    [Note] Running diagnostic: NetworkCheck
    Description: Create a pod on all schedulable nodes and run network diagnostics from the application standpoint

    ERROR: [DNet2001 from diagnostic NetworkCheck@openshift/origin/pkg/diagnostics/network/run_pod.go:77]
    Checking network plugin failed. Error: User "developer" cannot get clusternetworks at the cluster scope


    [Note] Running diagnostic: ClusterRegistry
    Description: Check that there is a working Docker registry

    ERROR: [DClu1006 from diagnostic ClusterRegistry@openshift/origin/pkg/diagnostics/cluster/registry.go:209]
    The "docker-registry" service exists but has no associated pods, so it
    is not available. Builds and deployments that use the registry will fail.

    [Note] Running diagnostic: ClusterRouterName
    Description: Check there is a working router

    ERROR: [DClu2007 from diagnostic ClusterRouter@openshift/origin/pkg/diagnostics/cluster/router.go:156]
    The "router" DeploymentConfig exists but has no running pods, so it
    is not available. Apps will not be externally accessible via the router.

    分辨率(更新)
  • 卸载了最新的 1.13 并安装了最新的 1.12 docker-engine。
  • 使用 centos 存储库完成安装。 Reference
  • 使用的命令

  • Installing dependency se-linux

    sudo yum install docker-engine-selinux-1.12.6-1.el7.centos.noarch

    Installing docker-engine

    sudo yum install docker-engine-1.12.6-1.el7.centos.x86_64

    最佳答案

    尝试根据 this comment 将 docker 降级到 1.13.1 .

    关于docker - 将简单的 docker 镜像部署到 openshift 的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44070093/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com