Edge computing has been proved an efficient approach to provisioning computation offloading service to vehicles on road through Road-Side Units (RSUs). However, the traffic volume on road is highly dynamic, while RSU-based edge servers are static in terms of geographical location and computation capacity. To address this problem, this paper proposes a mobile edge server placement strategy using cruising UAVs along the roads based on the genetic algorithm. We first build a mathematical model to characterize the deployment cost of these UAV-mounted servers and their routes. Next, we design a heuristic UAV-mounted edge server deployment scheme based on K-medoid clustering and genetic algorithms. Experimental results verify that our proposed UAV deployment scheme satisfies the offloading demand of IoV nodes while reducing the total deployment cost by 17.05% to 48.94% compared with existing popular approaches.