-1

I have configured jenkins with github.com. Jenkins notices if commit occurs and then jenkins make the docker image and upload the new image to docker hub. How can I make k8s listens to docker hub i.e. k8s notices the change in docker hub and then creates a new deployment. What tool should be used?

2 Answers 2

0

You can't on the fly, but you can build a system around Docker hub if you setup a webhooks. I have build a free software for Docker Swarm auto-deployment https://github.com/pnk-sh/docker-octopus-stack

If you use software there "pull" every min. then you get in troubles with Docker Hub when you hit 5000 pull's a day.

Its required you buy a pro-account, free account will only allow you around 250 pulls a day.

0

You could try to run Jenkins agents in the k8s cluster. Then you could write a script that is capable of update the tag of a deployment. We use gitlab in k8s and in conjunction with helm it is possible to update and deploy the image.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.