Was Arjuna’s killing Karna when he was chariot-less not unfair, being against the kshatriya codes?
The unfairness had begun from the Kaurava side decades earlier when they tried to poison Bhima and burn the Pandavas alive.
In the Kurukshetra war, at its start the commanders of the two sides had agreed upon the codes to be followed in the war. Dhrishtadyumna, the Pandava commander, had declared that their side would not break the war codes first, but if the Kauravas broke those codes first, then the Pandavas would not let themselves be held back by the war codes.
In the ensuing battles, the kshatriya code that a chariot-less warrior should not be attacked was violated first by the Kauravas’ side. On the thirteenth day, six of their maha-rathas including Karna ganged together to kill the chariot-less Abhimanyu. So, Karna simply reaped what he had sown – he violated the code first by attacking the chariot-less Abhimanyu and was paid back in kind, as had been agreed at the start of the war.
And the unfair attack on Abhimanyu was not a one-off incident on the part of the Kauravas. On the fourteenth day when Arjuna was striving to fulfill his vow to kill Jayadratha by sunset, his horses got exhausted, and needed rest and water. While Krishna decided to lead the horses away, Arjuna had to get off the chariot. Even on seeing him chariot-less, the Kaurava forces did not stop attacking him. To the contrary, they attacked him with greater ferocity, hoping to fell him in his dangerously disadvantaged condition. Still Arjuna held them back with his expert archery while simultaneously using mystical weapons to arrange for shade and water for his horses. In an all-out war, quarters are rarely given and Arjuna didn’t ask for them – neither should Karna have asked.
Karna himself violated that specific code on the seventeenth day during his confrontation with Arjuna. When Karna sent an unstoppable mystical weapon at Arjuna’s head, Krishna forcefully pushed the chariot into the ground so that the arrow hit Arjuna’s crown instead of his head. Arjuna’s life was saved, but his chariot got stuck in the ground. While Krishna jumped off the chariot to get it out of the ground, Arjuna was disadvantaged with an immobile chariot. Karna still attacked him and Arjuna didn’t ask to be spared, but fought back and defended himself.
So in the final confrontation, Karna’s reminding Arjuna of the kshatriya code was hypocritical. When Karna tried to take the high moral ground, Krishna exposed him thoroughly by listing all the times when Karna had paid scant regard to morality. Krishna’s fitting riposte silenced Karna whose head fell in an admission of his guilt.
Krishna deciding to illustrate the principle of shatho shathyam: with the cunning, one can be cunning, asked Arjuna to shoot Karna. By countering Karna’s arguments, Krishna had signaled to Karna that Arjuna would not desist from attacking. Karna could have taken that as a warning, re-mounted his stationary chariot and resumed fighting – or he could have fought from the ground itself, as had Arjuna on the fourteenth day. His neglecting Krishna’s warning was a monumental blunder that cost him his life.