-
Notifications
You must be signed in to change notification settings - Fork 0
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
No Connectivity yet, logs attached #24
Comments
Hey, can you share the output of |
One thing to note here is that Calico will not accept any traffic from/to ip subnets it does not know about. You need to define an ippool on each cluster for each remote pod subnet. In your case it would look like:
for the "local" cluster, and the respective one for the remot containing the local pod ip range. Make sure that this pool is Regarding your ping, you should be trying that experiment from inside a pod, following the above logic. Also, make sure you do not have any network policies deployed which block the remote traffic. I appreciate that even though this is calico related config, it should be documented under our instructions here as well. |
peer: peer: peer: peer: -- -- From output of wg show, shouldn't atleast one peer contain the allowedips to have a subnet to which 1.1.133.154 belong? Networkpolicies were all deleted at the time of testing above. Also, note that my cluster has route reflectors running within the clusters. No peering between route-reflectors of each cluster though. |
Yes, the daemonset pods should be able to update them when it is running. They should be harmless and you shouldn't try to delete those, they might actually allow wireguard devices to be successflly paired even in times where your semaphore-wireguard is not running (for example during a rollout).
ok that is a vital thing for calico to allow the traffic here.
yes, one of the peers should be allowing the 1.1.133.0/24 subnet. This value is derived from the nodes'
Apart from that it looks like the wireguard peers are able to communicate fine, so traffic should be able to flow throw for the allowed subnets there? |
@laxmanvallandas calico config, which includes the ipam, is usually passed using a configMap: |
We are not using host-local. As I see that PodCIDR is the one which is propagated to remote cluster through wireguard, Looks like using a host-local is a prerequisite for this utility to give expected results. Other random IP's allocated from the broader range might not be able to reach. |
@laxmanvallandas I see that the Kubernetes Nodes have a |
@ffilippopoulos I am using calico ipam. I noticed that you have added a limitation section now. Thanks for that. And, really appreciate your prompt responses. |
@laxmanvallandas I am sorry this is not working with your setup as is, I do not know if switching to host-local ipam is an option for you. It is not ideal for us to support many different ipams as we are developing against our environment. This is why I asked if you could provide the value of |
I'looked briefly on calico-ipam and it looks like we'd have to start watching |
Config used:
{
"local": {
"name": "local"
},
"remotes": [
{
"name": "remot",
"kubeConfigPath": "/config", # kubeconfig config of remot cluster
"podSubnet": "1.1.128.0/17",
"remoteSATokenPath": "/etc/semaphore-wireguard/tokens/remote1/token",
"wgListenPort": 51824
}
]
}
Logs of the service:
[INFO] semaphore-wireguard: No key found, generating a new private key: path=/var/lib/semaphore-wireguard/wireguard.remot.key
semaphore-wireguard: Configuring wireguard: device=wireguard.remot port=51824 pubKey=<an encrypted key>
1 shared_informer.go:240] Waiting for caches to sync for nodeWatcher
[INFO] semaphore-wireguard: starting node watcher
[WARN] semaphore-wireguard: Cannot sync peers while canSync flag is not set
1 shared_informer.go:247] Caches are synced for nodeWatcher
Route after the service is up:
[~]$ route -n
1.1.128.0 0.0.0.0 255.255.128.0 U 0 0 0 wireguard.remot
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0
nodes on remot cluster has route similar route similar to above but with interface being wireguard.local and for destination 2.2.128.0(pod network of local)
--- Connectivity check from one of the node(10.10.12.125) hosting pods:
[~]$ ping 1.1.133.154
PING 1.1.133.154 (1.1.133.154) 56(84) bytes of data.
From 10.10.12.125 icmp_seq=1 Destination Host Unreachable
ping: sendmsg: Required key not available
---- route get from node(10.10.12.125)
[~]$ ip route get 1.1.133.154
1.1.133.154 dev wireguard.remot src 20.20.133.5
cache
---- Remote key present
[ ~]$ ls /var/lib/semaphore-wireguard/wireguard.remot.key
/var/lib/semaphore-wireguard/wireguard.remot.key
----- tcpdump on the remote node(20.20.133.5):
[ ~]$ sudo tcpdump -n -i eth0 'src or dst 10.10.12.125'
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
09:27:23.649518 IP 20.20.133.5.51824 > 10.10.12.125.51824: UDP, length 32
09:27:48.666056 IP 10.10.12.125.51824 > 20.20.133.5.51824: UDP, length 32
---- Communication between nodes in two clusters exist
Note: Pods were up on both clusters before semaphore wireguard is launched. Hope this should not be an issue.
@george-angel @ffilippopoulos Can I get some help? May be I am something?
The text was updated successfully, but these errors were encountered: