If there is any man or woman among you, in any of the towns which the Lord your God gives you, who does evil in the eyes of the Lord your God, sinning against his agreement,
Turn away from worshipping anything or anyone that is not God.
Deu 17:3 By becoming a servant of other gods and worshipping them or the sun or the moon or all the stars of heaven, against my orders;
Deu 17:4 If word of this comes to your ears, then let this thing be looked into with care, and if there is no doubt that it is true, and such evil has been done in Israel
And let your king, be (an image of) the King of kings.
Deu 17:18 And when he has taken his place on the seat of his kingdom, he is to make in a book a copy of this law, from that which the priests, the Levites, have in their care:
Deu 17:19 And it is to be with him for his reading all the days of his life, so that he may be trained in the fear of the Lord his God to keep and do all the words of this teaching and these laws:
Deu 17:20 So that his heart may not be lifted up over his countrymen, and he may not be turned away from the orders, to one side or the other: but that his life and the lives of his children may be long in his kingdom in Israel.