3 min read
Since Kubernetes v1.2 we can autoscale an application based on metrics like CPU provided by the metrics-server. As of Kubernetes v1.6, it is possible to autoscale off of custom metrics and later on, starting Kubernetes v1.10, we can autoscale using any metric from outside the cluster, like the ones collected by datadog
10/01/2022
Read more...2 min read
We can choose to expose some of the Pod's information as volumes or environment variables using DownwardAPIVolumeFile. It can expose both Pod fields and Container fields
05/01/2022
Read more...2 min read
Some applications might need to retrieve (or at least know) some of the Pod's metadata, for example, it's namespace. We can push this information using fieldPath without having to grant access to the Kubernetes API or using any template engine (such as Helm) to set it's value (at the end of the day it would be hardcoding the value on the Pod's definition)
04/01/2022
Read more...2 min read
To set a value for a variable on terraform we have several ways of doing it:
03/01/2022
Read more...2 min read
If we try to use the template fullname function inside a range block as follows:
{{ range .Values.secrets }}
---
apiVersion: 'kubernetes-client.io/v1'
kind: ExternalSecret
metadata:
name: "{{ template "pet2cattle.fullname" . }}-{{ . | replace "_" "-" }}"
(...)
{{ end }}
We will get a can't evaluate field Values in type string like follows:
Error: template: pet2cattle/templates/_helpers.tpl:14:14: executing "pet2cattle.fullname" at <.Values.fullnameOverride>: can't evaluate field Values in type string
29/12/2021
Read more...