Kuberenetes pod -> docker container
xmeaindes opened this issue · comments
xmeaindes commented
Describe the bug
Started a docker container via docker compose, and pod in kuberntes. Trying to connect from pod to container using DNS *.orb.local
and container IP, but connection fails
curl: (1) Received HTTP/0.9 when not allowed
, is gRPC connection
To Reproduce
No response
Expected behavior
No response
Diagnostic report (REQUIRED)
No response
Screenshots and additional context (optional)
No response
slinorb commented
The connection from a k8s pod to a docker container works fine:
Welcome to OrbStack Debug Shell!
This shell provides useful commands & tools, making it easy to debug any container (even if minimal).
Use 'dctl' to install and remove packages.
Learn more: https://go.orbstack.dev/debug
root@local-path-provisioner-957fdf8bc-lhlts /
❯ curl -v http://n1.n1.orb.local
* Host n1.n1.orb.local:80 was resolved.
* IPv6: fd07:b51a:cc66:0:a617:db5e:c0a8:f702
* IPv4: 192.168.247.2
* Trying [fd07:b51a:cc66:0:a617:db5e:c0a8:f702]:80...
* Trying 192.168.247.2:80...
* Connected to n1.n1.orb.local (192.168.247.2) port 80
> GET / HTTP/1.1
> Host: n1.n1.orb.local
> User-Agent: curl/8.6.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: nginx/1.25.4
< Date: Sat, 30 Mar 2024 23:23:38 GMT
< Content-Type: text/html
< Content-Length: 615
< Last-Modified: Wed, 14 Feb 2024 16:03:00 GMT
< Connection: keep-alive
< ETag: "65cce434-267"
< Accept-Ranges: bytes
<
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
html { color-scheme: light dark; }
body { width: 35em; margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif; }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>
<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>
<p><em>Thank you for using nginx.</em></p>
</body>
</html>
* Connection #0 to host n1.n1.orb.local left intact
xmeaindes commented
I figured out the problem. I had docker-compose with host: localhost and that's why it didn't work.