Hi, is it possible to add labels to the pods creat...
# ask-metaflow
f
Hi, is it possible to add labels to the pods created by
kubernetes
decorator inside the flow? I don't think it's supported currently, right?
a
Not from within the task container. But if you have access to the Kubernetes API, you can make an API call to add more labels using the Kubernetes SDK - we can’t make the assumption that the API access will be safe in all contexts.
f
This would mean identifying the correct job? I see metaflow itself adds some more annotations and labels https://github.com/Netflix/metaflow/blob/master/metaflow/plugins/kubernetes/kubernetes.py#L406 Won't it be "easier" to allow user provided annotations and labels inside kubernetes decorator?
a
Was your query around adding labels that are determined after the task has launched or before? For the later case, we have work in our backlog.
f
I just want to annotate the underlying pods actually. Not sure if I am looking at the right place.