dns

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PublicDnsRecommendation = "Check your public network connectivity and outbound security settings."
	CoreDnsRecommendation   = "CoreDNS pods might be down. Check their liveness using `kubectl get pods -n kube-system -o wide -l k8s-app=kube-dns`."
)

Variables

View Source
var (
	GoogleDnsServer = DnsServer{
		Name:   "Google DNS",
		Server: "8.8.8.8",
		Queries: []string{
			"www.google.com",
			"www.bing.com",
		},
		Recommendations: []string{PublicDnsRecommendation},
		HelpLinks: []string{
			"https://developers.google.com/speed/public-dns",
		},
	}
	AzureDnsServer = DnsServer{
		Name:   "Azure DNS",
		Server: "168.63.129.16",
		Queries: []string{
			"www.google.com",
			"www.bing.com",
		},
		Recommendations: []string{
			PublicDnsRecommendation,
			"VM might be on a bad host. Try to `redeploy` it.",
		},
		HelpLinks: []string{
			"https://docs.microsoft.com/en-us/azure/virtual-network/what-is-ip-address-168-63-129-16",
			"https://docs.microsoft.com/en-us/azure/virtual-network/virtual-networks-name-resolution-for-vms-and-role-instances#azure-provided-name-resolution",
		},
	}
	AksCoreDnsServerPublic = DnsServer{
		Name:   "AKS Core DNS",
		Server: "10.0.0.10",
		Queries: []string{
			"www.google.com",
			"www.bing.com",
		},
		Recommendations: []string{
			PublicDnsRecommendation,
		},
		HelpLinks: []string{
			"https://kubernetes.io/docs/tasks/administer-cluster/dns-custom-nameservers/",
			"https://kubernetes.io/docs/tasks/administer-cluster/coredns/",
			"https://coredns.io/plugins/kubernetes/",
		},
	}
	AksCoreDnsServerInCluster = DnsServer{
		Name:   "AKS Core DNS",
		Server: "10.0.0.10",
		Queries: []string{
			"kubernetes.default.svc.cluster.local",
		},
		Recommendations: []string{
			CoreDnsRecommendation,
		},
		HelpLinks: []string{
			"https://kubernetes.io/docs/tasks/administer-cluster/dns-custom-nameservers/",
			"https://kubernetes.io/docs/tasks/administer-cluster/coredns/",
			"https://coredns.io/plugins/kubernetes/",
		},
	}
	SystemdResolvedDnsServer = DnsServer{
		Name:   "systemd-resolved",
		Server: "127.0.0.53",
		Queries: []string{
			"www.google.com",
			"www.bing.com",
		},
		Recommendations: []string{
			"systemd-resolved service might not be running. Check by running `sudo systemctl status systemd-resolved`.",
		},
		HelpLinks: []string{
			"https://www.freedesktop.org/software/systemd/man/systemd-resolved.service.html",
		},
	}
)

Functions

This section is empty.

Types

type DnsChecker

type DnsChecker struct {
	// contains filtered or unexported fields
}

func New

func New() *DnsChecker

func (*DnsChecker) Check

func (c *DnsChecker) Check(ctx *base.CheckContext) ([]*base.CheckResult, error)

func (*DnsChecker) Name

func (c *DnsChecker) Name() string

type DnsClient

type DnsClient interface {
	Exchange(m *dns.Msg, a string) (r *dns.Msg, rtt time.Duration, err error)
}

type DnsServer

type DnsServer struct {
	Name            string
	Server          string
	Queries         []string
	Recommendations []string
	HelpLinks       []string
}

Jump to

Keyboard shortcuts

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