How did Buddha find out about God?

The Buddha said that people do not have to believe in gods to receive enlightenment, but that they can believe in gods if they wish to do so. Thus, the is that the Buddha did not find out about God at all. However, he would have approved of people believing in God, provided that they exercise tolerance towards those who do not.