According to Hindu scripture, only Brahmanas can teach the Vedas and knowledge that directly comes from Vedic texts:
Manu 1.88 - For the Brāhmaṇas he ordained teaching, studying, sacrificing and officiating at sacrifices, as also the giving and accepting of gifts.
The other duties and knowledge can be learned from anyone else as per Apastamba Dharma Sutras:
Some declare, that the remaining duties [which have not been taught here] must be learnt from women and those of all castes.
Brahma Vidyas are different ways you can meditate on Brahman or the Jivatma, and the different Brahma Vidyas are described in the Upanishads. In most Brahma Vidyas, the teachers are Brahmanas. However, there is one Brahma Vidya in which the teacher is a king, a kshatriya, and that is the Panchagni Vidya found in the Brihadaranyaka Upanishad in this section:
- The king said: 'Do not be offended with us, neither you nor your forefathers, because this knowledge has before now never dwelt with any Brâhmana. But I shall tell it to you, for who could refuse you when you speak thus?
However, in another Brahma Vidya in the Kaushitaki Upanishad, a Kshatriya tells a Brahmana that it is improper for a Kshatriya to teach a Brahmana a Brahma Vidya, so he took him to a Brahmana who could teach the Vidya:
Thereupon Bâlâki came, carrying fuel in his hand, saying: 'May I come to you as a pupil?' Agâtasatru said to him: 'I deem it improper that a Kshatriya should initiate a Brâhmana. Come, I shall make you know clearly.' Then taking him by the hand, he went forth. And the two together came to a person who was asleep. And Agâtasatru called him, saying: 'Thou great one, clad in white raiment, Soma, King.' But he remained lying. Then he pushed him with a stick, and he rose at once. Then said Agâtasatru to him: 'Bâlâki, where did this person here sleep? Where was he? Whence came he thus back?' Bâlâki did not know.
My question is, are Kshatriyas allowed to teach only the Panchagni Vidya? Is this the exception to the rule that only Brahmanas can teach the Brahma Vidyas?
What do commentators say about this?