Understanding Kubernetes deployments with Helm
I am trying to understand all the YAML code we have in our solution for deploying to Kubernetes. I’ve got three hours today, here’s what I learnt.
What is a Kubernetes object?
A Kubernetes object represents how you would like your cluster to behave in Kubernetes — it describes which applications are running, the resources available to those applications, and any policies that have been set.
There are two main parts to a Kubernetes object — the spec and the status.
- The spec is set when you create the object and describes what you want to happen in your cluster.
- The status is the current state of the object which is continually updated by the Kubernetes system. Kubernetes ensures that the two states match.
This example is taken from the Kubernetes documentation, which I thought was helpful to explain the concept:
For example: in Kubernetes, a Deployment is an object that can represent an application running on your cluster. When you create the Deployment, you might set the Deployment
spec
to specify that you want three replicas of the application to be running. The Kubernetes system reads the Deployment spec and starts three instances of your desired application--updating the status to match your…