Let me first mention the general duties of the Kshatriya Varna with an excerpt from the Kurma Purana:
The kshatriyas constitute the second of the four classes. They were created from Brahma’s arms. The duties of kshatriyas include dana (donation of alms), adhyayana (studying) and performing yajnas (sacrifices). But their primary duties are to take up arms and fight, It is their job to punish the evil and protect the good. A kshatriya who performs these tasks well, attains Indra’s residence of Indraloka.
The Shanti Parva of Mahabharat also mentions:
"Indra said, 'They that are not kings, however observant they may be of their duties, cannot easily attain the highest rewards of duty. Kingly duties first flowed from the original god. Other duties flowed afterwards from his body. Infinite were the other duties, with those of the Vanaprastha mode of life, that were created afterwards. The fruits of all those are exhaustible. Kingly duties, however, are distinguished above them. In them are included all other duties. For this reason Kshatriya duties are said to be the foremost of all. In days of old, Vishnu, by acting according to Kshatriya duties, forcibly suppressed and destroyed his foes and thereby afforded relief to the gods and the Rishis of immeasurable energy. If the divine Vishnu of inconceivable energy had not slain all his foes among the Asuras, then the Brahmanas, and (Brahman) the Creator of the worlds and Kshatriya duties, and the duties that first flowed from the Supreme deity, would all have been destroyed. If that first and foremost of gods had not, by putting forth his prowess, subjugated the earth with all her Asuras, then all the duties, of the four orders and all the duties in respect of the four modes of life would all have been destroyed in consequence of the destruction of Brahmanas.
By the last statement it seems clear that the biggest contribution that Kshatriyas can do for the society is safeguarding the rest of the people especially the brahmins who provide knowledge and guidance. Further, the text says:
In every Yuga, the duties of Brahmanas in respect of attaining to Brahma first set in. These, however, are all protected by kingly duties. The latter, on this account, are regarded as the foremost. Casting away life in battle, compassion for all creatures, knowledge of the affairs of the world, protection of men, rescuing them from danger, relieving the distressed and the oppressed, all these occur among Kshatriya duties practised by Kings. Persons that do not regard wholesome restraints and that are governed by lust and wrath, do not commit overt acts of sin from fear of kings. Others that are docile and of righteous behaviour succeed, in consequence of the same influence, in performing all their duties. For this reason Kshatriya duties are regarded to be righteous. Without doubt, all creatures live happily in the world, protected by kings exercising Kshatriya duties like children protected by their parents. Kshatriya duties are the foremost of all duties. Those eternal duties, regarded as the first in the world, embrace the protection of every creature. Themselves eternal, they lead to eternal emancipation.'"
Now, coming to the Dharma Shastras, the Manu Smriti also mentions much the same:
- The Kshatriya he commanded to protect the people, to bestow gifts, to offer sacrifices, to study (the Veda), and to abstain from attaching himself to sensual pleasures;
Chapter II Verse 155 says:
- The seniority of Brahmanas is from (sacred) knowledge, that of Kshatriyas from valour, that of Vaisyas from wealth in grain (and other goods), but that of Sudras alone from age.
Chapter VII mentions in detail the duties of a Kshatriya king:
I will declare the duties of kings, (and) show how a king should conduct himself, how he was created, and how (he can obtain) highest success.
A Kshatriya, who has received according to the rule the sacrament prescribed by the Veda, must duly protect this whole (world).
Verse 87. A king who, while he protects his people, is defied by (foes), be they equal in strength, or stronger, or weaker, must not shrink from battle, remembering the duty of Kshatriyas.
Not to turn back in battle, to protect the people, to honour the Brahmanas, is the best means for a king to secure happiness.
Those kings who, seeking to slay each other in battle, fight with the utmost exertion and do not turn back, go to heaven.
But the (Kshatriya) who is slain in battle, while he turns back in fear, takes upon himself all the sin of his master, whatever (it may be);
Verse 95. And whatever merit (a man) who is slain in flight may have gained for the next (world), all that his master takes.
Verse 144. The highest duty of a Kshatriya is to protect his subjects, for the king who enjoys the rewards, just mentioned, is bound to (discharge that) duty.
I think these excerpts sufficiently address the prescribed duties of Kshatriyas. Coming to the next part of your question, there was some leeway given to avail to the person's common sense rather than following all diktats verbally. Another section of the Mahabharat mentions:
"Bhishma said, 'I do not instruct thee in respect of duty, taught by what I have heard from the Vedas alone. What I have told thee is the result of wisdom and experience. This is the honey that the learned have gathered. Kings should gather wisdom from various sources. One cannot accomplish his course through the world with the aid of a morality that is one-sided. Duty must spring from the understanding; and the practices of those that are good should always be ascertained, O son of Kuru! Attend to these words of mine. Only kings that are possessed of superior intelligence can rule, expecting victory. A king should provide for the observance of morality by the aid of his understanding and guided by knowledge derived from various sources. The duties of a king can never be discharged by rules drawn from a morality that is one-sided. A weak-minded king can never display wisdom (in the discharge of his duties) in consequence of his not having drawn any wisdom from the examples before him.
This shows that there was some amount of flexibility in the duties that a king or a kshatriya needed to perform based on the morality of those acts. Coming back to the Manu Smriti, Chapter X mentions this:
Teaching, studying, sacrificing for himself, sacrificing for others, making gifts and receiving them are the six acts (prescribed) for a Brahmana.
But among the six acts (ordained) for him three are his means of subsistence, (viz.) sacrificing for others, teaching, and accepting gifts from pure men.
(Passing) from the Brahmana to the Kshatriya, three acts (incumbent on the former) are forbidden, (viz.) teaching, sacrificing for others, and, thirdly, the acceptance of gifts.
The above verse tells us what occupations a Kshatriya should NOT get into. Further verses answer the question quite clearly:
But a Brahmana, or a Kshatriya, living by a Vaisya's mode of subsistence, shall carefully avoid (the pursuit of) agriculture, (which causes) injury to many beings and depends on others.
But he who, through a want of means of subsistence, gives up the strictness with respect to his duties, may sell, in order to increase his wealth, the commodities sold by Vaisyas, making (however) the (following) exceptions - condiments of all sorts, cooked food and sesamum, stones, salt, cattle, and human (beings), dyed cloth, as well as cloth made of hemp, or flax, or wool, even though they be not dyed, fruit, roots, and (medical) herbs, water, weapons, poison, meat, Soma, and perfumes of all kinds, fresh milk, honey, sour milk, clarified butter, oil, wax, sugar, Kusa-grass; all beasts of the forest, animals with fangs or tusks, birds, spirituous liquor, indigo, lac, and all one-hoofed beasts.
Verse 95. A Kshatriya who has fallen into distress, may subsist by all these (means); but he must never arrogantly adopt the mode of life (prescribed for his) betters.
- Neither a Brahmana, nor a Kshatriya must lend (money at) interest; but at his pleasure (either of them) may, in times of distress when he requires money) for sacred purposes, lend to a very sinful man at a small interest.
So on the whole, the options for a Kshatriya who doesn't want to pursue a military life, are the services covered by the Vaishya or Shudra communities. Information Technology falls under services so it should be okay but if it involves teaching then it may not be acceptable.
To conclude, the one occupation a Kshatriya is not allowed to take up is that which involves teaching/performance of sacrifices for others & acceptance of gifts.