Kubernetes cluster not pulling images created by Skaffold

12/6/2019

This is my skaffold file:

apiVersion: skaffold/v1
kind: Config
metadata:
  name: app-skaffold
build:
  artifacts:
  - image: myappservice
    context: api-server
deploy:
  helm:
    releases:
    - name: myapp
      chartPath: chart/myapp

And in my Helm templates folder I have only one manifest.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: app-deployment
  labels:
    app: my-app
spec:
  replicas: 2
  selector:
    matchLabels:
      app: myapp-pod
  template:
    metadata:
      labels:
        app: myapp-pod
    spec:
      containers:
        - name: apiserver
          image: myappservice
          ports:
            - containerPort: 5050
          env:
            - name: a-key
              valueFrom:
                secretKeyRef:
                  name: secret-key
                  key: secret-key-value

But everytime I run:

$ skaffold dev

And check my pods' status with $ kubectl get pods, I get ErrImagePull Statuses.

This started since I decided to add Helm to the stack because it was working using only kubectl.

In my deploy section in my skaffold.yaml file, I had:

deploy:
  kubectl:
    manifests:
    - ./k8s-manifests/*.yaml

And it was working fine, the only thing I did was to move the manifest file into the templates folder of my Helm chart and change the skaffold.yaml file as shown above.

What am I missing?

-- RottenCheese
devops
kubernetes
kubernetes-helm
skaffold

1 Answer

12/6/2019

I ran into a registry issue where all my images suddenly disappeared after an ingress config change and skaffold (1.0.0) couldn't load anything. The only way I could fix it was by deleting my entire cluster and re-creating it again.

This probably won't help, but it's worth a shot.

-- SpeedyXeon
Source: StackOverflow