0

每当我尝试启动服务时,由于图像无法加载而失败。

我尝试过的事情:禁用外部查找图像:imagePullPolicy:从不

观察到的事情:我的主文件夹没有 .docker 文件夹

我检查过的东西:直接从 docker 运行图像 -> 工作正常

这是我从豆荚中看到的:

NAME                         READY   STATUS              RESTARTS   AGE    LABELS

jm-deploy-58d4bbbfc4-lgp5b   0/1     ErrImageNeverPull   0          81m    app=jobm,pod-template-hash=58d4bbbfc4
jm-deploy-78bf8c4f9f-7qq6w   0/1     ImagePullBackOff    0          145m   app=jobm,pod-template-hash=78bf8c4f9f

这是清单:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: jm-deploy
spec:
  replicas: 1
  selector:
    matchLabels:
      app: jobm
  template:
    metadata:
      labels:
        app: jobm
    spec:
      containers:
        - name: jobm-ctr
          image: job-mapper:0.1
          imagePullPolicy: Never
          ports:
            - containerPort: 5000
---
apiVersion: v1
kind: Service
metadata:
  name: jm-svc
spec:
  type: NodePort
  ports:
  - port: 5000
    nodePort: 30001
    targetPort: 5000
    protocol: TCP
  selector:
    app: jobm

码头工人图像:

REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
job-mapper          0.1                 3ca451be811a        6 hours ago         441MB
job-mapper          latest              f694164817af        13 days ago         438MB
<none>              <none>              251b8de50f85        13 days ago         438MB
<none>              <none>              ef96ffc41192        13 days ago         438MB
<none>              <none>              7578b072b0f9        13 days ago         438MB
<none>              <none>              9ffebaa68070        13 days ago         438MB
<none>              <none>              9ac9fd8e60e1        13 days ago         434MB
<none>              <none>              e3f0dd05b1df        13 days ago         434MB
ubuntu              20.04               4e2eef94cd6b        5 weeks ago         73.9MB
kindest/node        <none>              de6eb7df13da        4 months ago        1.25GB
hello-world         latest              bf756fb1ae65        8 months ago        13.3kB
4

0 回答 0