Create cluster to run ingress controller and set the dns resolver

kubebuilder-crd-dep-svc-ing

create cluster to run ingress controller and set the dns resolver

   $ kind create cluster --config clust.yaml 
   $ sudo nano /etc/hosts 
            add this -> 127.0.0.1   tasdid2.com
  

add ingress controller

   $ kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml
  

prepare your workdirectory with kubebuilder

  $ kubebuilder init --domain tapi.com
  

the above command will create the following structure :

alt text

then apply the following command :

  $ kubebuilder create api --group kapi --version v1 --kind Kcrd
  

resulting into :

alt text

make the Crd

  to make the crd we will follow the steps :
    1. edit the types.go
    2. generate the respective yaml
    3. apply the generated yaml to the cluster and introduce the crd to the world
    4. apply a test yaml

edit the types.go

  • in kubebuilder the types.go file exists as /api/v1/kcrd_types.go
  • get that and make edit

generate the respective yaml

  • in kubebuilder we dont need to run the command "$ controller-gen rbac:roleName=xt crd paths=./... output:crd:dir=sampleYaml output:stdout"
    as we did in the sample controller style. kubebuilder provides a makefile.
  • run the following command :
    $ make manifests
  • this will create the sample yaml named "kapi.tapi.com_kcrds.yaml" in the directory /config/crd/bases/

introduce the crd to the world

  • run the command :
    $ make install
  • the command will apply the sample yaml in the cluster and introduce the crd

apply the test yaml

  • there is a yaml testkb.yaml
  • run the command :
    $ kubectl apply -f testkb.yaml
  • if everything is ok, then you will see the msg that a new crd has been created

make and run the controller

  • edit the kcrd_controller.go in the controller folder
  • edit the mgr option ; add SyncPeriod ; set it to a lesser time (default is 10h); so your conciler will repeat faster
  • run commands :
    $ make build
    $ make run
  • enjoy the show
Similar Resources

DNS over HTTPS [mirror]

dnss dnss is a daemon for using DNS over HTTPS. It can act as a proxy, receiving DNS requests and resolving them using DNS-over-HTTPs (DoH). This can

Dec 26, 2022

DNS server with per-client targeted responses

GeoDNS servers This is the DNS server powering the NTP Pool system and other similar services. Questions or suggestions? For bug reports or feature re

Dec 15, 2022

GRONG is a DNS (Domain Name System) authoritative name server.It is more a research project than a production-ready program.

GRONG (Gross and ROugh Nameserver written in Go) is a DNS (Domain Name System) authoritative name server. It is intended as a research project and is

Oct 17, 2020

Multicast DNS library for Go

Introduction This package allows Go processes to publish multicast DNS style records onto their local network segment. For more information about mDNS

Oct 23, 2022

CUP - Cloudflare (DNS) Updater Program

CUP The Cloudflare (DNS) Updater CUP is a tool to turn CloudFlare DNS into a Dynamic DNS service. Documentation Documentation can be found in the docs

Jun 6, 2022

🐶 Command-line DNS Client for Humans. Written in Golang

🐶 Command-line DNS Client for Humans. Written in Golang

doggo 🐶 Command-line DNS client for humans doggo is a modern command-line DNS client (like dig) written in Golang. It outputs information in a neat c

Dec 29, 2022

CoreDNS is a DNS server that chains plugins

CoreDNS is a DNS server that chains plugins

CoreDNS is a DNS server/forwarder, written in Go, that chains plugins. Each plugin performs a (DNS) function. CoreDNS is a Cloud Native Computing Foun

Jan 3, 2023

Are you forwarding DNS traffic to another server for some reason, but want to make sure only queries for certain names are passed? Say no more.

DNSFWD Redirect DNS traffic to an upstream. Get Latest: wget https://github.com/C-Sto/dnsfwd/releases/latest/download/dnsfwd_linux (replace linux with

Dec 16, 2022

Fast DNS implementation for Go

Fast DNS implementation for Go Features 0 Dependency Similar Interface with net/http Fast DoH Server Co-create with fasthttp Fast DNS Client with rich

Dec 27, 2022
DNS server using miekg/dns offering dynamic subdomains, time-over-dns, and standard zone file support.

dns-go DNS server using miekg/dns offering dynamic subdomains, time-over-dns, and standard zone file support. dynamic subdomains web.myapp.192.168.1.1

Dec 14, 2021
The /etc/hosts parsing and resolver library for golang

Hostsfile The /etc/hosts parsing and resolver library for golang Hostsfile is a go (golang) package for parsing hosts files and performing reverse IP

May 11, 2022
A DNS client in Go that supports Google DNS over HTTPS

dingo A DNS client (stub resolver) implemented in Go for the Google DNS-over-HTTPS. It effectively encrypts all your DNS traffic. It also supports Ope

Nov 9, 2022
dnscrypt-proxy 2 - A flexible DNS proxy, with support for encrypted DNS protocols.
dnscrypt-proxy 2 - A flexible DNS proxy, with support for encrypted DNS protocols.

Overview A flexible DNS proxy, with support for modern encrypted DNS protocols such as DNSCrypt v2, DNS-over-HTTPS and Anonymized DNSCrypt. dnscrypt-p

Jan 3, 2023
A smol DNS server (<100 loc) that's configured with a static JSON file. Useful for split-dns.

A smol DNS server (<100 loc) that's configured with a static JSON file. Useful for split-dns.

Jul 27, 2022
CoreDNS plugin implementing K8s multi-cluster services DNS spec.

corends-multicluster Name multicluster - implementation of Multicluster DNS Description This plugin implements the Kubernetes DNS-Based Multicluster S

Dec 3, 2022
Fast and lightweight DNS proxy as ad-blocker for local network with many features

Blocky Blocky is a DNS proxy and ad-blocker for the local network written in Go with following features: Features Blocking - Blocking of DNS queries w

Jan 1, 2023
A tool to solve DNS pollution of GitHub website. Query the real IP address of domain names such as github.com, and refresh the domain name setting of the system hosts file.

githubDNS Target A tool to solve DNS pollution of GitHub website. Query the real IP address of domain names such as github.com, and refresh the domain

Oct 14, 2021
Free and open source, powerful network-wide ads & trackers blocking DNS server
Free and open source, powerful network-wide ads & trackers blocking DNS server

Privacy protection center for you and your devices Free and open source, powerful network-wide ads & trackers blocking DNS server. AdGuard.com | Wiki

Nov 20, 2021
DNS library in Go

Alternative (more granular) approach to a DNS library Less is more. Complete and usable DNS library. All Resource Records are supported, including the

Dec 26, 2022