To develop and interoperate smart city applications efficiently, smart city IoT platforms require efficient handling of various types of sensor devices, networking and computing resources, and different domain applications. To address this fact, the authors of this paper proposed a research project named 'Fed4IoT', which is an acronym for federation of IoT and cloud infrastructures, to provide scalable and interoperable smart city applications. The project primarily proposes two key technologies: IoT device virtualization and context-information sharing. In this paper, we introduce the IoT device virtualization (one of key technology in Fed4IoT) that enables efficient utilization of networking and computing resources by applying a micro-service sharing and dynamic resource scaling. In the performance evaluations, we implement three micro services, such as object detection, garbage detection and road damage detection, as smart city applications and dynamically and flexibly allocate computing resources to three micro services by using Docker and Kubernetes. Through the evaluations we validate that the proposed IoT device virtualization achieves the efficient computing resource utilization and reduction of networking resources.