How does Spread know to update image in Kubernetes?
I want to set up a Gitlab CD to Kubernetes and I read this article
However, I am wondering, how is it that my K8 cluster would be updated with my latest Docker images?
For example, in my
.gitlab-ci.yaml file I will have a
release stage that ultimately updates my cloud Docker images. By setting up the
deploy stage as instructed in the article:
deploy: stage: deploy image: redspreadapps/gitlabci script: - null-script
would Spread then know to “magically” update my K8 cluster (perhaps by repulling all images, perform
rolling-updates) as long as I set up my directory structure of K8 resources as is specified by Spread?
One Solution collect form web for “How does Spread know to update image in Kubernetes?”
I don’t have a direct answer, but from looking at the spread project it seems pretty dead. Last commit in Aug last year with a bunch of issues and not supporting any of the newer kubernetes constructs (e.g. deployments).
The typical way to update images in kubernetes nowadays is to run a command like
kubectl set image <deployment-name> <image>. This will in turn perform a rolling update on the deployment and shutting down a POD at a time updating it with the new image. See this doc.
Since spread is from before that, I assume they must use rolling update replication controller with a command like
kubectl rolling-update NAME -f FILE and picking up the new image from the configuration file in their project folder (assuming it changed). See this doc.