-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Exposing headless service with statefulset (in multi primary setup) is not resolvable across clusters. #31787
Comments
@howardjohn would appreciate any input on this |
ServiceEntry is not DNS resolvable by default without https://istio.io/latest/docs/ops/configuration/traffic-management/dns-proxy/ |
Thanks for the cue @howardjohn. I enabled DNS proxy in both clusters. Verified that it works with this step. Thereafter I created a ServiceEntry in cluster1 to make the statefulset pod(exposed via headless service) in cluster2 be reachable from cluster1: ServiceEntry spec: apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
name: helloworld-0
spec:
hosts:
- "helloworld-0.helloworld.test.svc.cluster.local"
location: MESH_INTERNAL
ports:
- number: 5000
name: http
protocol: TCP
resolution: DNS
This time running curl from a pod(
Any pointers on what could be going wrong here?
|
|
@irajdeep For different networks, this could not work now. |
@hzxuzhonghu got it. Thanks for the heads up. But in this case, cluster1 and cluster2 are on the same network i.e the pods have direct connectivity across the clusters. |
IC, you should apply this patch #31758 |
@hzxuzhonghu thanks for pointing it out, I will test with that patch. |
… On Fri, Apr 2, 2021 at 6:44 AM Rajdeep Das ***@***.***> wrote:
@hzxuzhonghu <https://github.com/hzxuzhonghu> thanks for pointing it out,
I will test with that patch.
I am wondering is there any "unstable/nightly" release of Istio with this
patch or do I need to build it locally and then test it?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#31787 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEYGXIAL7WKBIX3HDI2NZDTGXC2XANCNFSM42B52BQQ>
.
|
@irajdeep thank you for creating this issue, we were trying to achieve something similar with DNS proxying enabled (the Slack thread where you replied on Istio Slack). |
Tried with istio version |
🚧 This issue or pull request has been closed due to not having had activity from an Istio team member since 2021-04-02. If you feel this issue or pull request deserves attention, please reopen the issue. Please see this wiki page for more information. Thank you for your contributions. Created by the issue and PR lifecycle manager. |
@irajdeep did you manage to solve this issue...facing a similar problem |
@howardjohn does it work with headless stateful services automatically as pods come and go? |
Bug description
I have
multi-primary-cluster
set up on the same network based on these instructions. Cross cluster connectivity is working as expected as mentioned in these verification docs. But exposing aheadless
service(with a statefulset) in cluster2 is not getting resolved from cluster1(using pod FQDN).[x] Docs
[ ] Installation
[x] Networking
[ ] Performance and Scalability
[ ] Extensions and Telemetry
[ ] Security
[ ] Test and Release
[x] User Experience
[ ] Developer Infrastructure
[ ] Upgrade
Expected behavior
The headless service deployed in cluster2 is getting resolved from cluster1.
Steps to reproduce the bug
i. Follow the multi primary installation docs to install istio in multi-cluster setup.
ii. Verify the setup is working as per this verification docs.
iii. Create a headless
service
backed by astatefulset
in cluster 2.The service object was also created in cluster1 (-- not sure if it's necessary for this use case).
iv. verify the pod FQDN is resolvable from cluster2:
curl helloworld-0.helloworld.test.svc.cluster.local:5000/hello
-- works as expected.v. Create service entry objects corresponding to each of the statefulset pods in the
test
namespace in cluster1 to make thepod
FQDNs resolvable from cluster1 with the following spec.and
vi. exec into a pod in cluster1(in
test
namespace) and runcurl helloworld-0.helloworld.test.svc.cluster.local:5000/hello
-- this would returnCould not resolve host: helloworld-0.helloworld.test.svc.cluster.local
Version (include the output of
istioctl version --remote
andkubectl version --short
andhelm version --short
if you used Helm)How was Istio installed?
https://istio.io/latest/docs/setup/install/multicluster/multi-primary/
Environment where the bug was observed (cloud vendor, OS, etc)
Deployed on AWS using KOPS.
Note:
ServiceEntry
object was created based on the discussion here: #7495Additionally, please consider running
istioctl bug-report
and attach the generated cluster-state tarball to this issue.Refer cluster state archive for more details.
The text was updated successfully, but these errors were encountered: