K8s_dns_chaos: enables inject DNS chaos in a Kubernetes cluster for Chaos Engineering

k8s_dns_chaos

Name

k8s_dns_chaos - enables inject DNS chaos in a Kubernetes cluster for Chaos Engineering.

Description

This plugin implements the Kubernetes DNS-Based Service Discovery Specification.

CoreDNS running with the k8s_dns_chaos plugin can be used to do chaos tests on DNS.

This plugin can only be used once per Server Block.

Note:

It works with CoreDNS 7d5f5b87a4fb310d442f7ef0d52e3fead0e10d39.

Syntax

k8s_dns_chaos [ZONES...]

The k8s_dns_chaos supports all options in plugin kubernetes, besides, it also supports other configuration items for chaos.

kubernetes [ZONES...] {
    endpoint URL
    tls CERT KEY CACERT
    kubeconfig KUBECONFIG CONTEXT
    namespaces NAMESPACE...
    labels EXPRESSION
    pods POD-MODE
    endpoint_pod_names
    ttl TTL
    noendpoints
    transfer to ADDRESS...
    fallthrough [ZONES...]
    ignore empty_service

    chaos ACTION SCOPE [PODS...]
    grpcport PORT
}

Only [ZONES...], chaos and grpcport is different with plugin with kubernetes:

  • [ZONES...] defines which zones of the host will be treated as internal hosts in the Kubernetes cluster.

  • chaos ACTION SCOPE [PODS...] set the behavior and scope of chaos.

    Valid value for Action:

    • random: return random IP for DNS request.
    • error: return error for DNS request.

    Valid value for SCOPE:

    • inner: chaos only works on the inner host of the Kubernetes cluster.
    • outer: chaos only works on the outer host of the Kubernetes cluster.
    • all: chaos works on all the hosts.

    [PODS...] defines which Pods will take effect, the format is Namespace.PodName.

  • grpcport PORT sets the port of GRPC service, which is used for the hot update of the chaos rules. The default value is 9288. The interface of the GRPC service is defined in dns.proto.

Examples

All DNS requests in Pod busybox.busybox-0 will get error:

    k8s_dns_chaos cluster.local in-addr.arpa ip6.arpa {
        pods insecure
        fallthrough in-addr.arpa ip6.arpa
        ttl 30
        chaos error all busybox.busybox-0
    }

The shell command below will execute failed:

    kubectl exec busybox-0 -it -n busybox -- ping -c 1 google.com
    ping: bad address 'google.com'
Similar Resources

DORY is a tool who enables people to recover their access to an Active Directory service, by changing, resetting or unlocking their account.

DORY - Server Expose a simple API to manipulate AD. Password reinitialization Password changer Account Unlocking You must have LDAPS (port 636) active

Oct 3, 2022

:alarm_clock: :fire: A TCP proxy to simulate network and system conditions for chaos and resiliency testing

:alarm_clock: :fire: A TCP proxy to simulate network and system conditions for chaos and resiliency testing

Toxiproxy Toxiproxy is a framework for simulating network conditions. It's made specifically to work in testing, CI and development environments, supp

Jan 7, 2023

A function for chaos testing with OpenFaaS

chaos-fn A function for chaos testing with OpenFaaS Use-cases Test retries on certain HTTP codes Test timeouts Test certain lengths of HTTP request bo

May 26, 2022

Toxiproxy - A TCP proxy to simulate network and system conditions for chaos and resiliency testing

Toxiproxy - A TCP proxy to simulate network and system conditions for chaos and resiliency testing

Toxiproxy is a framework for simulating network conditions. It's made specifically to work in testing, CI and development environments, supp

Nov 3, 2021

Chaostheory task1 - This is repository for Chaos Theory Internship Program

Chaos Theory Internship - Take Home Task. Hyeonwoo KIM(clo3olb) City Universiry

Feb 11, 2022

Local development against a remote Kubernetes or OpenShift cluster

Local development against a remote Kubernetes or OpenShift cluster

Documentation - start here! ** Note: Telepresence 1 is being replaced by our even better Telepresence 2. Please try Telepresence 2 first and report an

Jan 8, 2023

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

Jan 8, 2023

A client software for acme-dns with emphasis on usability and guidance through setup and additional security safeguard mechanisms

acme-dns-client A client software for acme-dns with emphasis on usability and guidance through setup and additional security safeguard mechanisms. It

Dec 2, 2022

Network-wide ads & trackers blocking DNS server

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

Dec 31, 2022
Packiffer is a lightweight cross-platform networking toolkit that let you sniff/analyze/inject/filter packets.
Packiffer is a lightweight cross-platform networking toolkit that let you sniff/analyze/inject/filter packets.

Packiffer is a lightweight cross-platform networking toolkit that let you sniff/analyze/inject/filter packets.

Dec 19, 2022
kcp is a prototype of a Kubernetes API server that is not a Kubernetes cluster - a place to create, update, and maintain Kube-like APis with controllers above or without clusters.
kcp is a prototype of a Kubernetes API server that is not a Kubernetes cluster - a place to create, update, and maintain Kube-like APis with controllers above or without clusters.

kcp is a minimal Kubernetes API server How minimal exactly? kcp doesn't know about Pods or Nodes, let alone Deployments, Services, LoadBalancers, etc.

Jan 6, 2023
DNS Ping: to check packet loss and latency issues with DNS servers

DNSping DNS Ping checks packet loss and latency issues with DNS servers Installation If you have golang, easiest install is go get -u fortio.org/dnspi

Nov 18, 2022
Verify IP addresses of respectful crawlers like Googlebot by reverse dns and forward dns lookups
Verify IP addresses of respectful crawlers like Googlebot by reverse dns and forward dns lookups

goodbots - trust but verify goodbots verifies the IP addresses of respectful crawlers like Googlebot by performing reverse dns and forward dns lookups

Aug 16, 2022
The Dual-Stack Dynamic DNS client, the world's first dynamic DNS client built for IPv6.

dsddns DsDDNS is the Dual-Stack Dynamic DNS client. A dynamic DNS client keeps your DNS records in sync with the IP addresses associated with your hom

Sep 27, 2022
netcup DNS module for caddy: dns.providers.netcup

netcup DNS module for Caddy This package contains a DNS provider module for Caddy. It can be used to manage DNS records with the netcup DNS API using

Nov 9, 2022
A fork on miekg/dns (since I've already forked zmap/dns)

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

Jan 19, 2022
A simple DNS forwarder that forwards DNS queries to various upstreams

A simple DNS forwarder that forwards DNS queries to various upstreams. If an upstream returns NXDomain, the next upstream is tried.

Jul 8, 2022
Package raw enables reading and writing data at the device driver level for a network interface. MIT Licensed.

raw Package raw enables reading and writing data at the device driver level for a network interface. MIT Licensed. For more information about using ra

Dec 28, 2022
A simple project which enables you to check wheather the website is up
A simple project which enables you to check wheather the website is up

Website Status Checker A simple project which enables you to check wheather the website is up and working fine or is the website has been crashed. Abo

Nov 8, 2021