Manage DNS Record in kubernetes.
Features:
- Generate DNS Record by kubernetes resources, eg. Ingress, Service, Node
- Sync DNS Record to DNS Providers, eg. alidns, cloudflare
- Run the following command to add the chart repository first:
helm repo add kube-dns-manager https://xzzpig.github.io/kube-dns-manager/
helm repo update
- Install the chart:
helm install kube-dns-manager kube-dns-manager/kube-dns-manager --namespace kube-dns-manager --create-namespace
kubectl apply -f https://raw.githubusercontent.com/xzzpig/kube-dns-manager/main/dist/install.yaml
helm uninstall kube-dns-manager --namespace kube-dns-manager
kubectl delete -f https://raw.githubusercontent.com/xzzpig/kube-dns-manager/main/dist/install.yaml --wait
- Create a
Template/ClusterTemplate. This sample template is used for Ingress, and is a
Record
template with
- label:
dns.xzzpig.com/scope: public
- domain: hosts in the Ingress
- type: CNAME
- value: sample.sample.com
- extra: a comment if
Provider
is cloudflare
- Create a Generator/ClusterGenerator to generate DNS Record by kubernetes resources. This samele generator will match
public
Ingress and create aResourceWatcher
to watch the changes of the Ingress which is used in theTemplate
(If other resources are used in theTemplate
, they will also be watched by theResourceWatcher
). Then theResourceWatcher
will generate DNSRecord
via theTemplate
. - Create a Provider/ClusterProvider. This samele provider will match any
Record
with labeldns.xzzpig.com/scope: public
and domain issample.com
and then sync to DNS Providers.
Copyright 2024.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.