k8s_gateway: k8s-gateway breaks ability of internal systems to resolve external domain names
when deploying the following, all future attempts to resolve any other dns queries fails.
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: excoredns
namespace: kube-system
spec:
interval: 5m
install:
createNamespace: true
chart:
spec:
chart: k8s-gateway
version: 1.1.9
interval: 5m
sourceRef:
kind: HelmRepository
name: k8s-gateway-helm-repo
namespace: flux-system
values:
domain: kube.lan
watchedResources: [ 'Ingress' ]
fallthrough:
enabled: true
- ip address of my one and only k3s node is
192.168.8.222 - in my openwrt router, i’ve added to the dnsmasq settings a dns-fowarding of
/kube.lan/192.168.8.222/
if i add the following :
extraZonePlugins: |
forward . 1.1.1.1 1.0.0.1 {
tls_servername cloudflare-dns.com
}
Then dns queries for external hostnames are able to leave my local network and get resolved, but then so does every other query for the cluster.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 18 (1 by maintainers)
👍🏻 If i disable systemd-resolved and wipe k3s then restart, it all works.
I imagine this isn’t usually a problem for people running docker via DockerForWin, or DockerForMac or some cloud-init based linux os that doesn’t setup resolveconf.
#mysterysolvedThis means your k8s/k3s node DNS resolver is misconfigured.
Seems like a symptom of the same problem.
Just so that we’re clear, our plugin,
k8s_gateway, is designed to resolve external k8s resources (ingress, services etc.). You can combine it with other plugins, likeforwardif you also want it to act as a DNS forwarder, but this is entirely optional. For all intra-cluster DNS needs, you have to use standard kubernetes DNS add-on (coredns with kubernetes plugin).Here are some of my thoughts based on what I understood from your description:
This should be the responsibility of dnsmasq/openwrt resolver.
Both are the responsibility of standard kubernetes DNS add-on.
You need to use the
forwardplugin for that.