Cook the pasta al dente in salted water according to package directions. Reserve about ½ cup of the pasta water.
While the pasta cooks, heat a large deep skillet over medium heat and add the butter.
Once melted, add the flour and whisk for about 1 minute.
Whisk in the milk and pesto. Continue to whisk for about 3-5 minutes or until thickened. The mixture should coat the back of a spoon.
Turn the heat off and add a handful of cheese at a time, whisking it in until completely combined until adding another handful.
Once the cheese is fully whisked into the sauce, pour the pasta into the sauce along with a splash of pasta water. Mix until everything is completely incorporated. If the sauce is too thick, add another splash of pasta water.