Found the solution in google:
gcloud functions add-event-trigger FUNCTION_NAME --trigger-resource TOPIC_NAME --trigger-event google.pubsub.topic.publish --subscription SUBSCRIPTION_NAME
But its showing Invalid choice: 'add-event-trigger'
gcloud functions deploy FUNCTION_NAME --trigger-resource TOPIC_NAME --trigger-event google.pubsub.topic.publish --subscription SUBSCRIPTION_NAME
Its giving error: unrecognized arguments: --subscription