Churn is a great challenge for the development and deployment of Distributed Hash Table networks, but current churn treatments ignore the effect of adapting the size of routing table flexibly to handle churn. In this paper, we research the routing table self-adaptive mechanism for Kademlia. Based on quantifying the influence of K, the parameter representing the size of a k-bucket, on routing performance, a self-adaptive algorithm of K is proposed. This algorithm adapts K to the variation of churn rate which is estimated by the validity of data in routing table. Simulation results show that it can reduce the lookup latency under churn. Even if the churn rate varies remarkably, the network is flexible enough to provide fine performance.