Normally I would use ansible to deploy my code to a server.
Using k8s, what options are there?
Since everything is in a container, I guess the best practice is for immutable deployments as oppose to updating the code on a running instance?
Is it possible to just update the git revision # in your .yaml file and you can make it so it pulls from a specific version to deploy?
Set up Jenkins to build Docker containers of every app from their Git repos. Make it tag the images with Git revisions or whatever (I like commit number). Make it push images to your Docker private registry.
Put all *.yaml of the cluster into a Git repository. Commit-push changes to these configs. On the cluster end - pull-apply.
https://helm.sh/ can help you.
Here are the steps you need to take:
<your-helm-chart>
.values.yaml
(input to yaml template) will have one parameter git_commit_id: <some-id>
image: your-app:{{ .Values.git_commit_id }}
, this comes from values.yaml
.helm install <your-helm-chart>
, this will give you a <release name>
.helm upgrade <release-name> <your-helm-chart> --set git_commit_id=NEWID