-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Service links don't work within kubernetes pods #8
Comments
By the way why is there double slashes after rweb:9000 in services.conf? |
Can individual containers be resolved by name in Kubernetes pods? The most elegant solution to this issue would be that svn:80 and rweb:9000 works in both docker-compose and kube. |
Using this workaround in a downstream dockerfile specifically for kubernetes:
The |
Improved the workaround so that it can work with regular docker, given a named link.
As the commit comment says I also tried the name |
I don't know what commit I'm referring to above, but now I realize that this isn't a problem with the docker image. Instead, in kubernetes, add a headless service apiVersion: v1
kind: Service
metadata:
name: rweb
spec:
clusterIP: None
selector:
app: svn
ports:
- port: 9000
targetPort: 9000 For more info see: https://kubernetes.io/docs/user-guide/services/#headless-services |
By design we call
svn
->rweb
->svn
to serve?rweb=
stuff. With docker-compose this works if services are named like that, or one of them is and the other has alinks:
entry.For example the svn container tends to respond
Proxy Error
DNS lookup failure for: rweb
if the following strings don't match:In Kubernetes you typically run svn and rweb containers in the same pod, which means that svn will reach rweb on 127.0.0.1:9000, but not rweb:9000.
The text was updated successfully, but these errors were encountered: