There are so many misconceptions that a government officer can’t earn money from blogging or youtube but that’s not true in this internet era.
Because recently our union minister Mr Nitin Gadkari Ji had given a news that he’s earning more than his salary from his Youtube channel.

And he had disclosed the amount also that he’s earning more than 3 lakh rupees per month from youtube.
So, if you are an IAS officer or any government employee you can earn money from blogging and youtube and this had been proven by our union minister so there’s no one who can resist this.