0

Any time I try to get a service up, it fails due to the image being unable to load.

Things I've tried: Disable looking for image externally: imagePullPolicy: Never

Things observed: My home folder doesn't have a .docker folder

Things I've checked: Ran image directly from docker -> works fine

Here's what I see from the pods:

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

Here's the manifest:

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

docker images:

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
Mr.UNOwen
  • 163
  • 1
  • 1
  • 14
  • Hello, did you try to check your image name ? Normally it should follow this structure: repository/job-mapper:tag – François Sep 24 '20 at 22:14
  • Just updated the post with that information. – Mr.UNOwen Sep 24 '20 at 22:44
  • 1
    It looks like KinD's endorsed approach for this is to [run a local registry server](https://kind.sigs.k8s.io/docs/user/local-registry/). That matches with its general spirit of simulating a multi-node cluster. – David Maze Sep 24 '20 at 23:16
  • Be aware that while **kind** is "in docker", the Nodes in the kind cluster themselves use `containerd` (that's actually why [`kind load`](https://github.com/kubernetes-sigs/kind/blob/v0.9.0/site/content/docs/user/quick-start.md#loading-an-image-into-your-cluster) even exists) – mdaniel Sep 25 '20 at 00:52
  • @DavidMaze thanks for the info, so if I understand things correctly kubectl can't just take a docker image from a client (the computer running kubectl), it either has to be in the cluster or in some registry of docker images? Also is kubectl the one that transmits the image or just tells the cluster where to get it? – Mr.UNOwen Sep 26 '20 at 00:02
  • `kubectl` (and other Kubernetes API clients) just tell the cluster the `image:` registry, name, and tag to use. A Pod has to be created from a Deployment, and scheduled on a node, and then that node will pull the image (if needed). A registry is basically required. – David Maze Sep 26 '20 at 00:09
  • @DavidMaze in the bash script shown, is there a way to convert the "kind create cluster --config=-..." into a yaml expression? Not entirely sure what being stated with the multiple EOFs and '|'. – Mr.UNOwen Sep 29 '20 at 08:45

0 Answers0