In Sotah 11a we find
The Gemara proceeds to discuss the sojourn of the Jewish people in Egypt. The verse states: “And there arose a new king over Egypt, who knew not Joseph” (Exodus 1:8). Rav and Shmuel disagree about the interpretation of this verse. One says that this means he was actually a new king, and one says that this means that his decrees were transformed as if he were a new king. The one who says that he was actually a new king holds that it is because it is written “new.” And the one who says that his decrees were transformed holds that it is because it is not written: “And the previous king of Egypt died and a new king reigned.” This indicates that the same king remained. According to this interpretation, the words: “Who knew not Joseph” (Exodus 1:8), mean that he was like someone who did not know him at all. Although he certainly knew Joseph and his accomplishments, he acted as if he didn’t.
This seems to imply that according to the opinion that he was actually a new king, we can interpret "Who knew not Joseph" literally - that he actually did not know him. But surely everyone inside and outside of Miztrayim (and especially the person who became a new king) would have known who Yosef was, since he was second in command of the largest empire in the world and provided food for the whole surrounding region during the years of famine.
This answer gives a suggestion by R' Hirsch that the ruler was foreign and therefore didn't know who Yosef was. But this is still hard to understand for the same reason given above. And even if for some reason he hadn't heard of him before, surely he would have learned who Yosef was upon ascending to the throne of Egypt.