Software-defined network (SDN) allows traffic engineering and flow management by decoupling the control and data planes. SDN has attracted a lot of attention recently because of its centralized control, flow programmability and flexible resource management. However, to support centralized control, flow programmability and flexible resource management, most of the advanced SDN designs require per-flow management, which would easily make the flow table of a software switch overflow and incur undesired processing overhead when a network scales up. To overcome such huge traffic demands, we propose a cluster-based macro-flow management framework to balance the trade-off between customized services and management costs. The key idea of our design is to group similar flows into a cluster and replace per-flow management with per-cluster management. To achieve this goal, we cluster flows with consideration of the similarity of their traffic patterns. To adapt to varying traffic load, we further propose a hierarchical cluster merging scheme to dynamically merge clusters and make the best tradeoff between flow entry saving and routing performance guarantee. Our evaluation demonstrates that the proposed cluster-based flow management framework can significantly reduce the flow table usage, while producing minimum negative impact on routing performance.