One day the LORD said to Moses, "Climb to the top of the mountains east of the river, and look out over the land I have given the people of Israel.
References for Numbers 27:12
After you have seen it, you will die as Aaron your brother did,
for you both rebelled against my instructions in the wilderness of Zin. When the people of Israel rebelled, you failed to demonstrate my holiness to them at the waters." (These are the waters of Meribah at Kadesh in the wilderness of Zin.)
References for Numbers 27:14
Then Moses said to the LORD,
"O LORD, the God of the spirits of all living things, please appoint a new leader for the community.
Give them someone who will lead them into battle, so the people of the LORD will not be like sheep without a shepherd."
The LORD replied, "Take Joshua son of Nun, who has the Spirit in him, and lay your hands on him.
Present him to Eleazar the priest before the whole community, and publicly commission him with the responsibility of leading the people.
Transfer your authority to him so the whole community of Israel will obey him.
When direction from the LORD is needed, Joshua will stand before Eleazar the priest, who will determine the LORD's will by means of sacred lots. This is how Joshua and the rest of the community of Israel will discover what they should do."
References for Numbers 27:21
So Moses did as the LORD commanded and presented Joshua to Eleazar the priest and the whole community.
Moses laid his hands on him and commissioned him to his responsibilities, just as the LORD had commanded through Moses.