Preheat the oven to 400°F and line a baking sheet with parchment paper.
In a bowl, toss the carrot sticks with 1 tablespoon olive oil, ½ teaspoon salt, and ¼ teaspoon pepper until evenly coated.
Pat the pork tenderloin dry with paper towels. Rub the remaining tablespoon of olive oil over the surface, then season with the remaining salt and pepper.
Spread the pesto evenly over the top and sides of the pork to form a crust.
Place the pork on the baking sheet and arrange the carrots around it in a single layer.
Roast for 25 to 30 minutes, or until the pork reaches an internal temperature of 145°F and the carrots are tender with browned edges.
Remove from the oven and let the pork rest for 5 minutes before slicing and serving with the carrots.