Then the good king, of noble kin, kissed the best of thanes and embraced his neck, the Scylding prince; tears were shed by that gray-haired man…The man was so dear to him that he could not hold back the flood in his breast, but in his heart, fast in the bonds of his thought, a deep-felt longing for the dear man burned in his blood. (1870-1873)
As can be seen from in this episode, as Beowulf's actions and attitude as a warrior during battle have gained him respect and affection of others. We also see this when Hygelac is killed and Hygd, Hygelac's wife, offers Beowulf the throne over her son:
Hygd offered him the hoard and kingdom, rings and royal throne; she did not trust that her son could hold the ancestral seat against foreign hosts, now that Hygelac was dead. But despite their misery, by no means could they prevail upon that prince at all that he should become lord over Heardred…Yet he upheld him in folk with friendly counsel, good will and honors. (2369-2377)
Here again we see the amount of trust that is bestowed on Beowulf as a result of his ability to successfully follow the warrior's code combined with the good nature of his character. This all speaks to Beowulf as a warrior which is his rank throughout most of the poem. However, once we get to the fight with the dragon, he has been king of Geatland for fifty years. As king, he has an obligation that is different from the one he had as a warrior. Now he must protect his people from invading nations and beasts. Moreover, he has a responsibility to serve as a good example for the Geats by showing them that they can not let fear or age hinder their efforts; they have an obligation not only to themselves but to their fellow countrymen.