> we are getting error like context deadline exceeded
You haven't show the actual error, nor where you saw it.
The most likely explanation I can see is simply that prometheus cannot communicate with node_exporter - for example, you've misconfigured the target or there is some sort of firewalling in between.
To prove this, login to the prometheus server (or container where prometheus is running), and do:
curl -h 'http://x.x.x.x:yyyy/metrics'
where x.x.x.x:yyyy is the IP address and port that you've configured as the target to scrape.