Sushil
Sushil

Reputation: 391

How to set up automatic deployment to Kubernetes from Docker registry

So many CICD tools use a git trigger to start the pipeline, but I want to use a new image upload to Docker registry. I have my own self-hosted Docker registry. Whenever a new image is pushed to the registry, I want to then automatically deploy that image into a workload in Kubernetes. It seems like this would be simple enough, but so far I'm coming up short.

It seems like it might be possible, but I'd like to know whether it is before I spend too much time on it.

The sequence of events would be:

  1. A new image is pushed to the Docker registry
  2. Either the registry calls a webhook or some external process polls the registry and discovers the image
  3. Based on the base image name, the CICD pipeline updates a specific workload in Kubernetes to pull the new image

A couple of other conditions: the CICD tool has to be self-hosted. I want everything to be self-contained within a VPC, so there would be no traffic leaving the network containing the registry, the CD tool, and the Kubernetes cluster.

Has anyone set up something like this or has actual knowledge of how to do so?

Upvotes: 1

Views: 557

Answers (1)

Rico
Rico

Reputation: 61521

Sounds like the perfect job for Flux.

flux

There are a handful of other tools you can try:

✌️

Upvotes: 1

Related Questions