-
Notifications
You must be signed in to change notification settings - Fork 12
/
k8s-dnsperf-bench.yaml
68 lines (67 loc) · 1.58 KB
/
k8s-dnsperf-bench.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
apiVersion: v1
kind: ConfigMap
metadata:
name: dns-records-config
namespace: default
data:
records.txt: |-
www.google.com A
www.amazon.com A
kubernetes.default.svc.cluster.local A
kube-dns.kube-system.svc.cluster.local A
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: dnsperf
name: dnsperf
namespace: default
spec:
progressDeadlineSeconds: 600
replicas: 1
selector:
matchLabels:
app: dnsperf
template:
metadata:
labels:
app: dnsperf
spec:
containers:
- env:
# please replace the DNS_SERVER_ADDR/DNS_SERVER_PORT according to the command output
# - kubectl get -n kube-system svc kube-dns -o go-template='{{.spec.clusterIP}}{{"\n"}}'
- name: ADDRESS_FAMILY
value: "any"
- name: TRANSPORT_MODE
value: "udp"
- name: DNS_SERVER_ADDR
value: "10.100.0.10"
- name: DNS_SERVER_PORT
value: "53"
- name: MAX_CLIENTS
value: "1"
- name: MAX_THREADS
value: "1"
- name: MAX_TEST_SECONDS
value: "30"
- name: TIMEOUT_FOR_QUERY
value: "5"
- name: MAX_QPS
value: "100000"
image: guessi/dnsperf
imagePullPolicy: Always
name: dnsperf
volumeMounts:
- mountPath: /opt/
name: dns-records-volume
readOnly: true
dnsPolicy: ClusterFirst
restartPolicy: Always
volumes:
- configMap:
defaultMode: 420
name: dns-records-config
name: dns-records-volume