I need to add a REST API for Kubernetes rolling update feature. Is there a way we can write extensions for Kubernetes API? If that so is there any documentation about writing them?
The Extending the API doc describes how you can add resources to the Kubernetes API.
If you just want a REST API for rolling update, you should check out the Deployment object.