Open venkatt007 opened 3 years ago
/cc @geoand
@iocanel have you ever used skaffold? I have not
I have played just a little bit with it.
From what I see, it doesn't really fancy our Dockerfile placement and does require a little bit tinkering:
In other words, it needs to the user to change the context dir from src/main/docker to the module root.
Once this is done, it does seem to work smoothly (at least the skaffold run
part).
Thanks @iocanel for the information.
@venkatt007 how would you expect Quarkus to help in this case?
@iocanel Thanks for the info. @geoand Yes I too was facing the issue, skaffold dev was not running with some error "cannot watch files from empty dir target/quarkus-app/lib directory". May be I will try to place the Dockerfile in root folder like @iocanel mentioned and see if that works. May be some kind of this continous sync can be added as part of kubernetes extension as well to make the development environment setup easier
@iocanel But I kind of tried a sample with proper context properties set. Will share the sample project here. May be you can have a quick look and help me what am I missing. My other projects with manually created Dockerfile working fine.
Here is the sample which I am trying https://github.com/venkatt007/quarkus-kubernetes-quickstart
So what you need initially is a way for Quarkus to output the Kubernetes manifests in another location?
@geoand Yeah. May be that would be helpful.
This is the error i am getting
You are getting that error when doing what?
when I run "skaffold dev" or "skaffold run"
I don't see anything wrong with the manifest location. They are being picked up without issues.
The only issue I see is the Dockerfile
location. They are being correctly detected, but confuse skaffold
into thinking that src/main/docker
is the context dir.
This is fixed with something like:
apiVersion: skaffold/v2beta17
kind: Config
metadata:
name: hello-quarkus
build:
artifacts:
- image: iocanel/hello-world:0.1-SNAPSHOT
docker:
dockerfile: src/main/docker/Dockerfile.jvm
deploy:
kubectl:
manifests:
- target/kubernetes/kubernetes.json
- target/kubernetes/kubernetes.yml
The skaffold.yaml
above is the generated one, with the following changes:
src/main/docker
With those changes skaffold runs ok-ish. By ok-ish I mean that it builds, pushes, deploys, but I do have some minor issues, mostly in that the application crashes. Not sure why yet, but it does seem like somethings wrong with the image itself. I'll update the issue with the error.
@iocanel Still I am not able to get this running. Can you share a sample you tried or update in the repo I shared and push back. I am still facing the above issue after referring dockerfile and kubernetes file with absolute path without context in skaffold file as you mentioned 😞
Will quarkus auto deploy kubernetes yaml in dev mode or should I run mvn package only to deploy to kubernetes cluster?
Description
It will be very helpful if we can get a sample application using kubernetes extensions properties along with skaffold/tilt so that it will be easier to get started with quarkus in kubernetes. I tries to setup but couldn't succeed. (Describe the feature here.)
Implementation ideas
Sample application with skaffold/tilt enabled for development