Closed pratikbin closed 3 years ago
Hello,
Have you tried https://github.com/masipcat/wireguard-go-docker#basic--kube-dns ? Basically you're configurung the wg-go from you local pc to use the k8s dns server, so you can discover the services by name.
I assume you already configured your k3s cluster with this yaml: https://github.com/masipcat/wireguard-go-docker#kubernetes (contains the iptables to set up NAT on PostUp)
Thanks @masipcat for fast reply,
I am using k3s with coreDNS (default out of the box) and connecting wg (kernel version) from local pc which is successful so far
Have you tried https://github.com/masipcat/wireguard-go-docker#basic--kube-dns ? Basically you're configurung the wg-go from you local pc to use the k8s dns server, so you can discover the services by name.
yes
I assume you already configured your k3s cluster with this yaml: https://github.com/masipcat/wireguard-go-docker#kubernetes (contains the iptables to set up NAT on PostUp)
I am using k3s with coreDNS (default out of the box)
Have you tried https://github.com/masipcat/wireguard-go-docker#basic--kube-dns ? Basically you're configurung the wg-go from you local pc to use the k8s dns server, so you can discover the services by name.
I've never used k3s nor CoreDNS but it should work the same way. You need to configure the ip address of CoreDNS service in your local resolver.
But if you want, before configuring DNS, did you tried to connect to any k8s service using the ip address?
If you can ping k8s peer and you used the yaml in the readme, you should be able to talk to any k8s service.
I'm not sure if I understood where is the problem... I hope this helps
kindly can you look at below wg configs
wg-configmap wg.conf
local wg.conf. coredns is pod and it's ip is 10.41.0.10
still can't ping/curl pod/services through ip/k8s-fully-qualified-name
Why you use a different IP range for the tunnel?
I'd try using 11.0.0.2/16
for the local config (you need to set 11.0.0.0/16
in the AllowedIPs in the server).
yeah thanks for suggestion, actually i was trying create topology.
I'd try using 11.0.0.2/16 for the local config (you need to set 11.0.0.0/16 in the AllowedIPs in the server).
Application changed, Thanks for amazing project and support. :+1:
Hello, Thanks for amazing project, i setup this on my k3s cluster and it works fine, i can ping from both ends vice versa.
Now i want to access k8s services through wg-go from my local pc, i know there is something to do with iptables but don't know how and what!