1- Allah is knowledge. Knowledge is not part of Him. He is knowledge and He is power. If knowledge was a part of him he’s be composite and in need.
2- Allah’s knowledge always existed since it is his essence, but when he created us he also created signs for us so we can come to know about his attributes. The signs that give us knowledge about Allah is created, and so our knowledge of God is created. But His knowledge always existed.