Indian citizens can go visa-free to Kazakhstan, but suppose I want to stay there for longer. How can I extend the visa for longer duration, say 2 months?
Indian citizens can enter Kazakhstan visa-free for 14 days per entry, up to a total of 42 days in an 180-day period.
If you plan to stay for up to 30 days, you can apply for a Kazakh e-visa. E-visas require a Kazakh citizen to invite you (this can be a travel agency or organized tour if you do not know anyone in Kazakhstan) and can only be used when entering the country at Nur-Sultan or Almaty airport. The e-visa is not extendable beyond 30 days.
If even 30 days is not enough, you can try applying for a visa through the embassy of Kazakhstan in New Delhi, though I doubt they will be willing to grant longer than 30-day stays. (The Kazakh embassy in Washington says they only grant 30-day stays for tourists, for example.) Tourist visas (class B12) are not extendible while in the country.
Your best bet may be to visit Kazakhstan for 14 or 30 days without or with a visa, move on to another country (e.g., Kyrgyzstan, which issues e-visas to Indian citizens), and then, if you wish, return to Kazakhstan for another 14-day stay, as long as you do not exceed the 42-days-in-180 limit. I am unable to find any way that an Indian citizen can stay in Kazakhstan for tourism purposes for longer than that.