0

我的 controller.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...之前

请帮忙 :)

谢谢!

4

1 回答 1

1

kubectl describe pods -l name=hmrcaction应该给你更多有用的信息。

于 2016-04-07T18:22:17.893 回答