binddns-operator

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2021 License: MIT Imports: 3 Imported by: 0

README

binddns-operator

You can simply manages your DNS records with binddns-operator.

DnsDomain/DnsRule is the CRD of Kubernetes. Users can use them to change DNS records.

show

The Example

[root@localhost ~]# kubectl get dnsdomain
NAME             ENABLED   REMARK   UPDATE                
helloworld.com   true               2021-01-21 01:44:05
test.com         true               2021-01-20 21:38:09

[root@localhost ~]# kubectl get dnsrule
NAME                      ZONE             ENABLED   HOST   TYPE   DATA          TTL   MXPRIORITY
helloworld.com-b3378a6c   helloworld.com   true      www    A      1.1.1.1       10    0
test.com-8b223ed7         test.com         true      www    A      10.10.10.10   10    0

[root@localhost ~]# nslookup www.test.com 127.0.0.1
Server:		127.0.0.1
Address:	127.0.0.1#53

Name:	www.test.com
Address: 10.10.10.10

How To Deploy

We need to deploy Controller and Webhook

Deploy Controller
[root@localhost binddns-operator]# cd deploy/controller/

# Deploy DnsDomain CRD
[root@localhost controller]# kubectl apply -f crd_dnsdomains.yaml

# Deploy DnsRule CRD
[root@localhost controller]# kubectl apply -f crd_dnsrules.yaml

# Deploy RBAC
[root@localhost controller]# kubectl apply -f rbac.yaml

# Deploy ConfigMap
[root@localhost controller]# kubectl apply -f configmap.yaml

# Deploy Controller Deployment
[root@localhost controller]# kubectl apply -f deployment.yaml

Deploy Webhook
[root@localhost binddns-operator]# cd deploy/webhook/

# Generate Secret
[root@localhost webhook]# ./webhook-create-signed-cert.sh --service binddns-webhook-svc --secret binddns-webhook-certs --namespace kube-system

# Generate Deployment
[root@localhost webhook]# cat mutatingwebhook.yaml | ./webhook-patch-ca-bundle.sh > mutatingwebhook-ca-bundle.yaml


# Deploy
[root@localhost webhook]# kubectl apply -f mutatingwebhook-ca-bundle.yaml
[root@localhost webhook]# kubectl apply -f service.yaml
[root@localhost webhook]# kubectl apply -f deployment.yaml

Usage

Future

  • The better WebUI
  • Dynamic rndc key
  • Synchronous DnsDomain status
  • ...

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
pkg
apis/binddns/v1
Package v1 is the v1 version of the API.
Package v1 is the v1 version of the API.
generated/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
generated/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
generated/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
generated/clientset/versioned/typed/binddns/v1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
generated/clientset/versioned/typed/binddns/v1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL