Sodium and Potassium metals are highly reactive .
Sodium reacts with moisture present in air to produce Sodium hydroxide and H2 gas.
2Na +2 H2O ----> 2NaOH + H2
Its a exothermic reaction. Sodium metal burns vigorously with yellow flame.
Hence to avoid contact with moist air , sodium and Potassium are stored in Kerosene.
Well why only Kerosene :
---> Petrol and kerosene both are obtained from fractional distillation of fossil fuel petroleum.
B.P of petrol is : 95 °c
B.P of kerosene is : 150-300 °c
So petrol evaporates faster than kerosene.
Both can be used but kerosene is selected as it is cheaper and readily available than petrol.
Also boilingpoint of diesel is lower. Hence we use kerosene to store highly ractive metals like sodium