expose coredns outside of the cluster

This commit is contained in:
Pim Kunis 2024-04-02 22:18:01 +02:00
parent 7106bf5e14
commit 0d22f421bc
2 changed files with 27 additions and 0 deletions

View file

@ -65,6 +65,32 @@
loadBalancerIP: "192.168.30.128" loadBalancerIP: "192.168.30.128"
''; '';
}; };
configMaps.coredns-custom = {
metadata.namespace = "kube-system";
data."external.server" = ''
kubernetes.dmz {
kubernetes
k8s_external kubernetes.dmz
}
'';
};
services.kube-dns-external = {
metadata.namespace = "kube-system";
spec = {
type = "LoadBalancer";
loadBalancerIP = "192.168.30.133";
selector.k8s-app = "kube-dns";
ports = [{
port = 53;
targetPort = 53;
protocol = "UDP";
}];
};
};
}; };
helm.releases.metallb = { helm.releases.metallb = {

View file

@ -24,6 +24,7 @@ in
server = [ server = [
cfg.dmz.ipv4.router cfg.dmz.ipv4.router
"/kun.is/${cfg.dmz.ipv4.services}" "/kun.is/${cfg.dmz.ipv4.services}"
"/kubernetes.dmz/192.168.30.133"
]; ];
dhcp-range = [ dhcp-range = [