2:31 "Think thou also of thy duty and do not waver. There is no greater good for a warrior than to fight in a righteous war."
The actual Sanskrit transliteration of the verse is:
svadharmam api cāvekşya na vikaamptum arhasi dhamyhāddhi yuddhāc cheryo ŉyat kşatriyasya na vidyate
In another translation :
api...moreover; avekşya...considering; svadharmam...your natural righteousness; na arhasi...you should not; vikampitum...falter; hi...indeed; kşatriyasya...for upholders of justice; na vidate...there does not exist; anyat śreyah...a more appropriate endeavor; dharmyat yuddhāt...than a battle for righteousness.
One key element of this verse is the word "kşatriyasya". There are four orders of social administration, or keeping good order in society. Of these, the second is kşatriya. "Kşat" means to hurt, "trāyate" to give protection - so a kşatriya would give protection from harm, whether it be from an encroaching animal or enemy army. It is not the duty nor the fate of a kşatriya to take the path of a sannyāsan (renunciate) and eschew violence. In the scheme of things, a killing made by a kşatriya in his capacity as protector is considered righteous, as is a sacrifice of an animal by a brāhman in the performance of sacred duty. The animal is reincarnated into human life and the brāhman advances toward liberation.
It is not suitable for everyone to be a kşatriya, just as it does not suit everyone to be a sannyāsan.
Thank you to everyone who brought this up - it was a pleasure to delve into it more deeply.