Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to inherit Node-Labels to Pod-Labels in kubernetes?

Can I inherit node labels to pod labels?

i.e I want to have zone and instance-type labels from node to pods

like image 360
Ravichandra Avatar asked Jan 26 '23 23:01

Ravichandra


1 Answers

This feature is not yet supported.

Here is an open feature request on kubernetes.

Though there are few workarounds.

You can also refers this, where they make use of initContainer to get node label and assign it to pod label.

Hope this helps.

like image 127
mchawre Avatar answered Jan 28 '23 13:01

mchawre