2

Trying to use skaffold to run an app on Ubuntu. The exact same project runs just fine on MacOS but fails to run on Ubuntu 20.04. It's worth mentioning that if I simply run kubectl apply -f... everything works as expected. It's only when using skaffold I get the error message he Deployment "auth-deployment" is invalid: spec.template.spec.containers[0].image: Required value

Here is the the yaml file for the deployment and service:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: auth-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: auth
  template:
    metadata:
      labels:
        app: auth
    spec:
      containers:
        - name: auth
          image: smelkonian/auth
---
apiVersion: v1
kind: Service
metadata:
  name: auth-service
spec:
  selector:
    app: auth
  ports:
    - name: auth
      protocol: TCP
      port: 3000
      targetPort: 3000

And the skaffold.yaml:

apiVersion: skaffold/v2beta29
kind: Config
deploy:
  kubectl:
    manifests:
      - ./k8s/*
build:
  local:
    push: false
  artifacts:
    - image: smelkonian/auth
      context: auth
      docker:
        dockerfile: Dockerfile
      sync:
        manual:
          - src: 'src/**/*.ts'
            dest: .
  • can you compare the file `~/.skaffold/config` in both machines. It's possible that there's some config differences that's making it work on one machine and not on the other. – Gsquare Sep 22 '22 at 23:45
  • @Gsquare other than the dates exactly the same. Not much is in there. – user19979582 Sep 24 '22 at 14:27
  • @user19979582 I have the exact same problem, did you find a solution? – David Hume Sep 25 '22 at 01:14
  • @DavidHume. No opened an issue in github but still has not benn addressed. https://github.com/GoogleContainerTools/skaffold/issues/7856 Maybe you can go to the issue and let them know you have the same issue as well – user19979582 Sep 26 '22 at 17:15
  • @user19979582 I added my own comment to the gh issue. Have you found an answer for this issue? Ubuntu + Docker Desktop + Skaffold just don't seem to work :/ – CodeConnoisseur Dec 11 '22 at 21:47
  • See if this helps you: https://github.com/docker/desktop-linux/issues/100#issuecomment-1344374258 @CodeConnoisseur – user19979582 Dec 13 '22 at 17:42

0 Answers0