David's understanding of the kingdom of God was probably limited to the area of his own reign. He was however a prophet, as Peter said at Acts 2:30, which is why we see so much of David's Psalms quoted in the New Testament, but in his own lifetime he may not have had a vision of God's purpose and intent beyond what he lived with the nation of Israel. At that time, David's kingdom WAS God's kingdom.
David wrote, "All your saints shall bless you! They will speak of the glory of your kingdom and tell of your power, to make known to the children of man your mighty deeds and the splendor of your kingdom." Psalm 145:10-12 ESV
I feel certain David firmly believed he wrote the truth God gave him, but it was never realized. His death essentially put an end to the kingdom of God as David had envisioned its future. Solomon had an opportunity to continue the type of spiritually based reign as his father but he just didn't have the same heart for God as David.
Several hundred years after David wrote Psalm 145, Jesus said this to a group of the Pharisees who asked him a question about the coming of the kingdom of God, "The kingdom of God does not come with your careful observation, nor will people say, 'Here it is', or 'There it is' because the kingdom of God is within you." Luke 17:21 That is a concept of the 'kingdom of God' that David never envisioned. Nor did the succeeding generations of Jews who every Sabbath sang David's songs. What David wrote at Psalm 145 about the kingdom of God is absolutely true but in a much wider and deeper sense than David ever really saw.
At the time Jesus went around preaching about the kingdom of God in the same region where David lived, the people, although many generations removed from the successful kingdom of David, were still waiting for God to do what he had promised David. If you read Psalm 89, the song of Ethan the Ezrahite written long after the death of David, you can get a clear picture of the expectations of the people of Israel at the time of Jesus. Even after Jesus' resurrection and his forty days teaching his Apostles about the kingdom of God, they still were clinging to the ancient belief that God would "restore the kingdom to Israel".
Christian, know this, the kingdom of God does not reside in a building on the corner of 5th and Main street in any city or town. It resides within YOU. That is why God has given you his Holy Spirit, to testify to the reality of his kingdom among the human family.
Now go out today and tomorrow and tell someone the GOOD NEWS! HALLELUJAH & AMEN!