from within k8s, can curl svc, but R httr Get fails

5/1/2017

I'm trying to access one k8s svc from another svc and having issues. There is one frontend svc written in R using Shiny that tries to connect to another svc written in python.

I started out using docker-compose to have them connect and am now trying to move them into the cloud using kubernetes, but am having connection issues. Both services are listening on port 80, but forward to 3838, and 8080 respectively. I am able to bash shell into the gui container and curl into the python svc just fine from the gui container. I am also able to hit the python svc externally, but I cannot seem to address it from the gui container using httr/Shiny.

I get the following error, no matter what I use. I have tried using "http://", specifying the port, not specifying the port, adding "namespace.svc" to the end, etc.

"Couldn't resolve host name", call = curl::curl_fetch_memory(url, handle = handle)

-- user3712302
google-app-engine
kubernetes
r
shiny

1 Answer

5/2/2017

If both services are listening on port 80, would seem as if the second service wouldn't have deployed successfully. Does a 'kubectl get svc' show both services as having appropriately initialized?

-- TinaC
Source: StackOverflow