-
Notifications
You must be signed in to change notification settings - Fork 1
/
DNS service Lookup
24 lines (18 loc) · 1 KB
/
DNS service Lookup
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
DNS lookup for service:
master $ kubectl run test-bb --image=busybox:1.28 --restart=Never --rm -it -- nslookup nginx-resolver-service
service name
Server: 10.96.0.10
Address 1: 10.96.0.10 kube-dns.kube-system.svc.cluster.local
Name: nginx-resolver-service
Address 1: 10.104.100.37 nginx-resolver-service.default.svc.cluster.local
pod "test-bb" deleted
master $
DNS lookup for pod:
master $ kubectl run test-bb --image=busybox:1.28 --restart=Never --rm -it -- nslookup 10-244-1-10.default.pod
pod-IP.namespace.pod
Server: 10.96.0.10
Address 1: 10.96.0.10 kube-dns.kube-system.svc.cluster.local
Name: 10-244-1-10.default.pod
Address 1: 10.244.1.10 10-244-1-10.nginx-resolver-service.default.svc.cluster.local
pod "test-bb" deleted
master $