The maven fabric8:delete-pods
goal queries all the Pods in the current Kubernetes namespace to find all the pods using the current maven projects docker image and deletes them.
This will then cause the replication controllers in Kubernetes to recreate the pods again.
This is a useful way in development to quickly upgrade to a new docker image.
When running with DOCKER_HOST
and KUBERNETES_MASTER
pointing at your local fabric8 vagrant image if you are inside a project you can run:
mvn clean install docker:build fabric8:delete-pods
Then the following happens:
i.e. you should now have all the pods running in your vagrant image updated to the new docker image you just built.