There are absolutely rational reasons for Russia to invade Ukraine.
Looking back to the dissolution and subsequent plundering of the USSR, there became a rising Bourgeoisie within the Russian Federation. Since there wasn’t already Imperialist infrastructure for the Russian Federation to exploit the Third World (large, monopoly and financial Capitalists with international footholds), Putin tried to join NATO and join hands with the rest of the Imperialist western nations, and take “their share” of the super-profits. This was denied, and thus began a long few decades of growing tensions between NATO and the Russian Federation.
Ukraine on the other hand has been increasingly militarized, with anti-Russian sentiments rising. NATO increased expansion against Russian requests, leading to Russia trying to forcibly demilitarize Ukraine.
Regardless of morals, there is a material basis for this conflict.
As for Palestine, again, the oppressed have the rights to use violence to free themselves, especially if non-violence hasn’t worked, and in the face of genocide.