Using cloud computing for Internet of Things (IoT) applications necessitates the transmission of all data to the centralized structure of the cloud, thereby leading to an increase in network traffic and service time. Consequently, cloud computing proves impractical for latency-sensitive IoT applications. Fog computing, acting as an intermediate layer between the cloud and IoT, ensures low latency for such applications. The service placement problem, an NP-hard problem that determines which node should host each service, represents one of the major challenges in the fog computing paradigm. While lightweight containers have emerged as a highly efficient virtualization approach, prior research predominantly employed traditional VM-based architecture for service placement in fog computing. Therefore, this study introduces a multi-objective optimization approach for dynamic service placement in container-based fog computing, accounting for cost, latency, and energy consumption. Specifically, we propose a two-tier framework for resource management in fog computing based on Kubernetes. The multi-objective non-dominated sorting genetic algorithm II (NSGA-II) algorithm balances conflicting performance objectives, such as latency, cost, and energy consumption. Empirical results demonstrate that the proposed method outperforms existing state-of-the-art methods.