Superagent request within a kubernetes cluster -


i have 2 kubernetes controllers , services pods running named web , api respectively.

in web pod using superagent try , access api pod following http://api:3000/api/user results in error err_name_not_resolved

however if run shell on web pod , curl http://api:3000/api/user works should

am missing fundamental how superagent works? or else?

if launch superagent in browser, browser not part of kubernetes cluster, hence neither uses kube dns nor can access cluster ips.

to make work need expose api service external world means of nodeport/loadbalancer service or ingress


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -