Answer the question
In order to leave comments, you need to log in
How to pass the namespace in which the container is running using curl?
There is a curl container that rises in a certain namespace, is it possible using curl to send information about the namespace in which this container rose in a notification using curl? And if so, what should curl look like to get namespace.
Answer the question
In order to leave comments, you need to log in
I figured out that you can use environment variables to transfer the namespace to curl, passed it like this:
env:
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
Anton Bes
namespace can be available in /var/run/secrets/kubernetes.io/serviceaccount/namespace
but it seems to depend on the kubernetes version
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question