skip to Main Content

I have a Spring project to which I have made two very basic changes:

  1. logger.info("testing changes made");
  2. return new ResponseEntity<>(HttpStatus.NO_CONTENT); //previously HttpStatus.OK

I then:

  1. git committed the changes (not really necessary)
  2. mvn clean install -P docker-build-image
  3. docker tag my-service:old-tag my-service:new-tag

I then used this image to install the service in a kubernetes pod as follows:

echo "🟢 deploying auth service"
helm uninstall auth
kubectl delete pod -l app.kubernetes.io/name=auth
kind load docker-image my-service:new-tag
helm install auth ./auth --wait

The trouble is: I am never getting any changes. I only see the output from the old version of the application.

What is going on here? This is very strange to me. This feels very much like a maven|docker plugin kind of problem. Or, is it a kubernetes|kind|helm problem?

2

Answers


  1. Chosen as BEST ANSWER

    The problem I was experiencing resulted from the docker-building module was using an old snapshot to build the docker image. The wrong dependency was being used in the POM file of that module. I changed the dependency and everything worked just fine.


  2. mvn install will just install the package.

    You should do mvn package before install to make new jar file.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search