尝试上传我的kubernetes pod时出现错误状态

时间:2016-04-07 12:24:38

标签: docker kubernetes docker-compose dockerfile kubernetes-health-check

我的控制器.yaml看起来像这样:

apiVersion: v1
kind: ReplicationController
metadata:
  name: hmrcaction
  labels:
    name: hmrcaction
spec:
  replicas: 1
  selector:
    name: hmrcaction
  template:
    metadata:
      labels:
        name: hmrcaction
        version: 0.1.4
    spec:
      containers:
      - name: hmrcaction
        image: ccc-docker-docker-release.someartifactory.com/hmrcaction:0.1.4
        ports:
        - containerPort: 9000
      imagePullSecrets:
        - name: fff-artifactory

和服务yaml看起来像这样:

apiVersion: v1
kind: Service
metadata:
  name: hmrcaction
  labels:
    name: hmrcaction
spec:
  # if your cluster supports it, uncomment the following to automatically create
  # an external load-balanced IP for the frontend service.
  type: LoadBalancer
  ports:
    # the port that this service should serve on
  - port: 9000
  selector:
    name: hmrcaction

我有一个kubernetes集群,所以我想用这个rc将我的docker上传到集群,我这样做了:

kubectl create -f controller.yaml

但是我得到了一些奇怪的状态,当我运行命令kubectl get pods时,我得到了:

NAME               READY     STATUS             RESTARTS   AGE
hmrcaction-k9bb6   0/1       ImagePullBackOff   0          40s 
这是什么?状态为ErrImagePull之前......

请帮助:)

谢谢!

1 个答案:

答案 0 :(得分:1)

kubectl describe pods -l name=hmrcaction应该为您提供更多有用的信息。