We use kubernetes agents to run our pipelines. Does anyone know if there is a way to get what minion node the agent is running on without kubectl? Does the kubernetes plugin write an environment variable?
Date
Votes
2 comments
-
Allan Burdajewicz Hello Donald,
You can use the environment variable 'NODE_NAME' and 'NODE_LABELS' to get respectively the name and the labels of the node.
To get the pod IP, you can use a shell script:
hostname -i
But to get the host IP you would need to use kubectl.
Regards,
-
Donald Kallman That's what I figured, thank you
Please sign in to leave a comment.