Examples of military service are found in the Bible. The first example of military service is found in the Old Testament (Genesis 14), when Abraham's nephew Lot was kidnapped by king of Elam, and his allies. Abraham rallied to Lot's aid by gathering 318 trained men of his household and defeating the foreign forces.
King David was in the army and led his forces into battle. Although Solomon's reign was peaceful, he further expanded the army, adding chariots and horsemen (1 Kings 10:26).
Many Centurions mentioned in the New Testament are praised as Christians, God-fearers, and men of good character (Matthew 8:5-13, 27:54, Acts 10:1-2, 22). The titles and places may have changed, but the armed forces should be favourably valued as the Centurions in the NT.
[Answered by Pastor Quang Nguyen]