cilium / cilium-cli

CLI to install, manage & troubleshoot Kubernetes clusters running Cilium
https://cilium.io
Apache License 2.0
432 stars 209 forks source link

Cluster Mesh unable to derive service IPs automatically #755

Closed 1909490139 closed 1 month ago

1909490139 commented 2 years ago

Is there an existing issue for this?

What happened?

  1. In Ubuntu 18.04.6 LTS;
  2. RUN: cilium install --context rke1 --config cluster-pool-ipv4-cidr="10.1.0.0/16" --cluster-name rke1 --cluster-id 1 cilium install --context rke2 --config cluster-pool-ipv4-cidr="10.2.0.0/16" --cluster-name rke2 --cluster-id 2 --inherit-ca rke1 cilium clustermesh enable --context rke1 --service-type LoadBalancer cilium clustermesh enable --context rke2 --service-type LoadBalancer cilium clustermesh status --context rke2 cilium clustermesh status --context rke1
  3. Error: Unable to determine status: unable to derive service IPs automatically

Cilium Version

cilium-cli: v0.10.4 compiled with go1.17.7 on linux/amd64 cilium image (default): v1.11.2 cilium image (stable): unknown cilium image (running): v1.11.2

Kernel Version

Linux iZm5e0a4bgf0llxmdnaxbzZ 4.15.0-166-generic cilium/cilium#174-Ubuntu SMP Wed Dec 8 19:07:44 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Kubernetes Version

Client Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.6", GitCommit:"f59f5c2fda36e4036b49ec027e556a15456108f0", GitTreeState:"clean", BuildDate:"2022-01-19T17:33:06Z", GoVersion:"go1.16.12", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.6", GitCommit:"f59f5c2fda36e4036b49ec027e556a15456108f0", GitTreeState:"clean", BuildDate:"2022-01-19T17:26:47Z", GoVersion:"go1.16.12", Compiler:"gc", Platform:"linux/amd64"}

Sysdump

cilium-sysdump-20220303-175555.zip

Relevant log output

No response

Anything else?

No response

Code of Conduct

liusy58 commented 2 years ago

So how to fix this? I face the same error now.

iplakas commented 2 years ago

I face the same issue.

SebastienTolron commented 1 year ago

Hey,

Facing the same issue here. But I know Why.

Try to look up there : https://github.com/cilium/cilium-cli/blob/dcfb77269f4887d4f6aebbf19bf58e8ea3b737d1/clustermesh/clustermesh.go#L882

You will probably find a reason why cilium can't auto detect the IP.

In My case I am on a on premise cluster so LoadBalancer does not assign an ip. And since it is based on status field I can't use that...

Hope this helps

benpsnyder commented 1 year ago

I faced this when I did an AKS-to-AKS setup. I realized --service-type LoadBalancer was PENDING however I just got done setting up peering between vNets, and I should be able to use ClusterIPs between the peered networks.

# enable cilium cluster mesh
# use ClusterIP since we have peering between the clusters
cilium clustermesh enable --context $AKS_USA01_NAME --service-type ClusterIP
cilium clustermesh enable --context $AKS_DEU01_NAME --service-type ClusterIP
cilium clustermesh enable --context $AKS_JPN01_NAME --service-type ClusterIP

# Finally, connect the clusters. This step only needs to be done in one direction. The connection will automatically be established in both directions:
cilium clustermesh connect --context $AKS_USA01_NAME --destination-context $AKS_DEU01_NAME
cilium clustermesh connect --context $AKS_USA01_NAME --destination-context $AKS_JPN01_NAME
github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

github-actions[bot] commented 1 month ago

This issue has not seen any activity since it was marked stale. Closing.