skaffold: Skaffold sync failure
I am running skaffold 24 version. I am using skaffold sync(with sync command same as in version 26), its failing with exit status 2.
Expected behavior
I should be able to directly sync the modified file to running pod.
Actual behavior
Returning exit code 2.
level=warning msg=“Skipping deploy due to sync error: copying files: exit status 2”
Information
- Skaffold version: 24
- Operating system: Linux
- Contents of skaffold.yaml:
apiVersion: skaffold/v1beta6
kind: Config
build:
artifacts:
- image: someurl.com/kube/pythonserver
context: .
sync:
'*.py': .
kaniko:
buildContext:
localDir: {}
namespace: prashant
image: someurl.com/gkp/kaniko-executor:latest dockerConfig:
path: C:\Users\prashant\.docker\config.json
deploy:
kubectl:
manifests:
- deploy.yml
Steps to reproduce the behavior
- Make a sample hello world python application
- Create dockerfile for the same, build and deploy the application using kaniko and skaffold in dev mode.
- Change Hello world to Hello New world in python application.
- Skaffold would catch the changes made and would try to copy the file to running pod.
- Skaffold fails to copy the changed file.
Here is the Dockerfile for my application
FROM someurl.net/lrh7:latest
RUN yum install tar -y
COPY app.py .
EXPOSE 8080
CMD [ "python", "app.py" ]
https://groups.google.com/d/msg/skaffold-users/nGPcn6uypq8/oBciDgE5CQAJ
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 28 (28 by maintainers)
Okay - after rereading the posts - my first thought would be to make the file/dirs writable by the user 199 for development rather than a iterating with a root in dev. If you iterate with a root user, you might get access to files that are not realistic and get surprised later… Explicitly chmod-ing the files/dirs for sync seems like a smaller scale divergence between dev / prod.
I marked this as a documentation issue. We should document this in under Sync that if there might be permission issues that should be resolved via separate dev/prod profiles.