Practice Test CoreDNS in Kubernetes
Solution
-
Check the Solution
```
CoreDNS
```
-
Check the Solution
```
2
```
-
Check the Solution
```
10.96.0.10
```
-
Check the Solution
```
/etc/coredns/Corefile
OR
kubectl -n kube-system describe deployments.apps coredns | grep -A2 Args | grep Corefile
```
-
Check the Solution
```
Configured as a ConfigMapObject
```
-
Check the Solution
```
CoreDNS
```
-
Check the Solution
```
coredns
```
-
Check the Solution
```
cluster.local
```
-
Check the Solution
```
Ok
```
-
Check the Solution
```
web-service
```
-
Check the Solution
```
web-serivce.default.pod
```
-
Check the Solution
```
web-service.payroll
```
-
Check the Solution
```
web-service.payroll.svc.cluster
```
-
Check the Solution
```
kubectl edit deploy webapp
Search for DB_Host and Change the DB_Host from mysql to mysql.payroll
spec:
containers:
- env:
- name: DB_Host
value: mysql.payroll
```
-
Check the Solution
```
kubectl exec -it hr -- nslookup mysql.payroll > /root/nslookup.out
```