Skip to content
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

Can't set custom hosts for coredns #5312

Closed
1 task
631068264 opened this issue Mar 19, 2022 · 1 comment
Closed
1 task

Can't set custom hosts for coredns #5312

631068264 opened this issue Mar 19, 2022 · 1 comment

Comments

@631068264
Copy link

Environmental Info:
K3s Version: v1.22.7+k3s1

Node(s) CPU architecture, OS, and Version:

Linux master 5.4.0-104-generic #118-Ubuntu SMP Wed Mar 2 19:02:41 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Cluster Configuration:

sigle
Describe the bug:

After kubectl edit configmap coredns when restart k3s service or add new node , the config will be rewrite as default.

Steps To Reproduce:

Expected behavior:
I hope it can run like this

apiVersion: v1
kind: ConfigMap
metadata:
  name: coredns-custom # this is the name of the configmap you can overwrite with your changes
  namespace: kube-system
data:
    test.override: | # you may select any name here, but it must end with the .override file extension
          hosts { 
              10.0.0.1 example1.org
              10.0.0.2 example2.org
              10.0.0.3 example3.org
              fallthrough
          }

Actual behavior:

Additional context / logs:

Backporting

  • Needs backporting to older releases
@631068264
Copy link
Author

631068264 commented Mar 19, 2022

apiVersion: v1
kind: ConfigMap
metadata:
  name: xxxx
  namespace: kube-system
data:
    xxx.server: | 
          example1.org example3.org  {
              hosts {
                   127.0.0.1 example1.org example3.org
                   fallthrough
              }
          }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant