将简单的docker镜像部署到openshift时出现问题

时间:2017-05-19 12:25:52

标签: docker openshift kubernetes openshift-origin rhel7

我是原型的Openshift Origin最新版本。

操作系统:RHEL 7.3

Docker:17.05.0-ce

oc v1.5.1 + 7b451fc

kubernetes v1.5.2 + 43a9be4

  • 使用sudo用户完成安装
  • 使用oc cluster up
  • 启动了openshift
  • 以默认用户开发人员身份登录openshift
  • 尝试使用oc new-app hello-world
  • 部署docker helloworld应用
  • 使用oc get pod获取状态
  • 状态错误
  

NAME READY STATUS RESTARTS AGE

     

hello-world-1-deploy 0/1错误0 57m

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

错误:打开/var/run/secrets/kubernetes.io/serviceaccount/token:否   这样的文件或目录

尝试谷歌并获得了很多类似的问题参考,大多数人说这是在最新版本(或类似的答案)中修复。看起来像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. 卸载最新的1.13并安装了1.12最新的docker-engine。
  2. 使用centos存储库完成安装。 Reference
  3. 使用的命令
  4.   

    安装依赖关系se-linux

         

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

         

    安装docker-engine

         

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

1 个答案:

答案 0 :(得分:2)

尝试将docker降级为每this comment 1.13.1。