The problem
One copy of what is the same; write down only what differs
Four differences, and 212 lines that are identical.
A real application is a dozen manifests, and it runs in more than one place. Compare three environments. The replica count, the image tag, the hostname and a limit are different. Everything else, a couple of hundred lines, is exactly the same in all three. If you keep three full copies, you maintain six hundred lines for the sake of four differences, and sooner or later a fix goes into two of them and not the third.
Helm
A chart is manifests with blanks, and values to fill them
A template plus values gives the finished manifest.
Helm solves it with templates. In a chart, the manifests are written once, with placeholders where the differences go. Each environment then has a small values file. This one says six replicas, and version one point four point two. Helm puts the two together and sends ordinary manifests to the cluster. It also remembers what it installed as a numbered release, so an upgrade that goes wrong can be rolled back in one command.
Helm · Going deeper · 1 of 2
Lab: install, upgrade and roll back a chart
Install a chart, upgrade it with a new value, roll back.
Value precedence · Going deeper · 2 of 2
Values are layered: chart defaults, then -f files, then --set
The last source wins. helm template shows the result.
Kustomize
Kustomize lays small patches over plain manifests
A base of plain YAML, and an overlay of differences.
Kustomize takes the other road: no templates at all. You keep a base, which is plain, valid YAML. Here it asks for one replica. For production you add an overlay: a folder holding only the differences, such as this patch that says six. Kustomize lays the patch over the base and produces the final manifest. It is built into kubectl, so one flag, dash k, applies an overlay.
kustomization.yaml · Going deeper
The overlay file as written: start, rename, retag, patch, generate
resources, images, patches and a configMapGenerator.
GitOps
Git holds the truth; the cluster pulls itself into line
A commit is the deployment. Argo CD makes the cluster match.
However the manifests are produced, someone has to apply them. Git ops hands that job to the cluster itself. An engineer changes three replicas to six in a file, and the change is reviewed and merged. That is the whole deployment, as far as people are concerned. Argo C D runs inside the cluster and watches the repository. It sees that Git and the cluster no longer agree. So it applies the difference. And the cluster matches Git again.
The Application · Going deeper
An Argo CD Application: a repository, a path, a cluster and a policy
source is Git. destination is the cluster. syncPolicy says how far to go alone.
The landscape
Kubernetes is one project among many, each with one job
A project for each job, graded sandbox to graduated.
Step back and look at what you have met in this course, because each piece is a separate open source project. Containerd runs the containers, Kubernetes orchestrates them, and et cee dee keeps the state. Other projects handle pod networking, the service mesh, and packaging. Delivery from Git, metrics, and logs. Tracing, policy, and the registry. They live under one foundation, the C N C F, which grades each project. Graduated is the highest level, and all of these have reached it.
Lesson complete
You finished “Packaging and delivery”
Nicely done.