I have a Docker image that contains an application in python, running in Kubernetes as a deployment, I want to pass to that application some data. I used env vars but I would like to use annotations but I'm not sure how to read them, I saw that V1ObjectMeta has a field called annotations but I'm a bit lost of how to call it.
For example:
If my pod has this:
template:
metadata:
annotations:
foo: "var"
How to read foo: var using the python program that is running inside the pod using the Kubernetes library?