• Expose Pod information using an environment variable

    2 min read

    kubernetes pod data environment variable fieldPath

    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...
  • How to set a variable on terraform using environment variables

    2 min read

    terraform variables environment variables

    To set a value for a variable on terraform we have several ways of doing it:

    • Using the -var command line option.
    • In variable definitions (.tfvars) files. The files named terraform.tfvars, terraform.tfvars.json or any files with names ending in .auto.tfvars or .auto.tfvars.json will be loaded automatically, but they can also be loaded using the -var-file option.
    • As environment variables.

    03/01/2022

    Read more...
  • Setting secret into a environment variable

    2 min read

    kubernetes secret environment variable pod deployment

    Although it's not a best practice to feed secrets into environment variables it's still something that it is possible to do. Let's take a glance on how to do it

    05/03/2021

    Read more...

From pet to cattle
Treat your kubernetes clusters like cattle, not pets