-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Prevent CoreDNS from rewriting it's configmap on restart #2214
Comments
@VictorRobellini did you make any progress on this? |
For personal use I do just copy the coredns manifest to another file with a unique name, and start k3s with |
I used |
This repository uses a bot to automatically label issues which have not had any activity (commit/comment/label) for 180 days. This helps us manage the community issues better. If the issue is still relevant, please add a comment to the issue so the bot can remove the label and we know it is still valid. If it is no longer relevant (or possibly fixed in the latest release), the bot will automatically close the issue in 14 days. Thank you for your contributions. |
@VictorRobellini did you just manually configure I'm trying to do almost the exact same thing as you but with Klipper instead of MetalLB but I want to be able to add nodes dynamically and this workaround feels pretty fragile. |
@m-bers, I've never messed with that option, it wasn't needed to get my system up and running. I redeployed about 2 months ago and k8s_external was all I needed. |
I actually got my setup working today by creating another server block in apiVersion: v1
kind: ConfigMap
metadata:
name: coredns-custom
namespace: kube-system
data:
external.server: |
cluster.external:53 {
kubernetes
k8s_external cluster.external
} |
I'm currently using k3s in my Lab to host different services. The situation is that I want to expose my services via LB. I've replaced the included LB with metallb. Being able to share my services via L2 is great but what's even better is that I can utilize the k8s_external extension in CoreDNS. This allows me to create a dedicated subdomain that hosts all of my Kubernetes services. All services automatically get resolved to the subdomain (service name = "A" record) via CoreDNS. With an externally accessible CoreDNS and LAN DHCP setting search domains, it's now easier than ever to interact with my services. All it requires is some DNS config on my non-K3s DNS servers and to add a single line to the CoreDNS config map... long and short resolvable names for all the services!
The problem is that whenever I restart my system or the k3s services, the configmap gets reverted back to its original state. I imagine that I could "--disable coredns" and install it myself, but staying as close to the k3s distribution is a much better long term plan.
The text was updated successfully, but these errors were encountered: