I'm new at DevOps, and I looking for solution to my problem.

I have a private code repository where I have a some Flask apps in one of many folders. Example of structure:

- Project
-- Django Apps
--- django1_dir
--- django2_dir
--- django3_dir
-- Flask Apps
--- flaskApp_dir1 (dockerfile inside)
--- flaskApp_dir2 (dockerfile inside)
--- flaskApp_dir3 (dockerfile inside)

And I have a configured cluster on kubernetes on AWS instance. And a private docker repo. When I want to load new version of my flaskApp to cluster I need:

  1. Someone modify flaskApp on repo
  2. I need pull repo
  3. Locally build a new image based on new dockerfile
  4. Push app to repo
  5. Manually push docker image with new APPVersion to AWS trough ecr
  6. Then kubernetes change image to new version

My question is:

how can I automate this process? I have an script to push dockerimage to AWS through ecr. It is possible to create some kind of trigger that would work in such a way:

  1. Someone do a commit
  2. Script building a new docker image and push it to AWS automaticly

I read something about it, but as I said I'm totaly new in DevOps so any hint will be awesome. Now I have configured kubernetes, that aws instances and repo for docker images. I read about git hooks, flux and some other solutions but it's quite unclear for me so I looking for best practice for that problem. I wouldn't particularly want to install huge new tools either.

So maybe any hits or keywords I could get hooked on?

  • 1
    The term you are looking for is Continuous Deployment (CD)
    – Tom Knapen
    Commented Mar 21, 2021 at 20:23

1 Answer 1


how can I automate this process? I have an script to push dockerimage to AWS through ecr.

You are on the right track. Yes, this should be an automated process from Git push or when someone merge a Pull Request.

An important aspect of this is that this "automated process" should be on a dedicated system - such that it is repeatable in a consistent way. Typically this is called a "Continuous Integration Server" or just "Build Server".

Some popular choices for this kind of process:

  • Jenkins - old but popular
  • Tekton - Kubernetes native - but still in development
  • GitHub Actions - probably most interesting if your Git repo is on GitHub
  • Bitbucket Pipelines - probably most interesting if your Git repo is Bitbucket
  • AWS CodeBuild - limited but may be interesting if you use AWS
  • GitLab CI - probably most interesting if your Git repo is on GitLab

What you need to do is to configure your Git repository system (e.g. GitHub, Bitbucket, Gitlab or AWS CodeCommit) to initiate Pipelines on the Build system (a product of those listed above)

  • 1
    Thank u very much for that answer :) It's really helpfull!
    – martin
    Commented Mar 22, 2021 at 8:10

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.