The Good, the Bad and the Ugly with DNS wildcard entries… and Kubernetes

Foreword

tl;dr

# check the interface name on your host
NETIF="ens3"
cat > /etc/systemd/network/10-${NETIF}-dhcp.network << "EOF"
[Match]
Name=${NETIF}
[Network]
DHCP=ipv4
[DHCP]
UseDomains=false
EOF
systemctl restart systemd-networkd.service
sleep 4
systemctl restart systemd-resolved.service
network:
version: 2
ethernets:
ens3:
dhcp4-overrides:
use-domains: no

Check if you are affected

kubectl exec -ti MYPOD -- cat /etc/resolv.conf
search default.svc.cluster.local svc.cluster.local cluster.local ilikewildcards.com
nameserver 10.0.0.10
options ndots:5
kubectl exec -ti MYPOD -- getenet hosts example.com
10.0.101.2     example.com.ilikewildcards.com

Background

Explanation

References

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store