Add pods DNS resolution for external names
parent
7f3fb70d29
commit
c847d01b74
|
@ -61,6 +61,7 @@ data:
|
|||
fallthrough in-addr.arpa ip6.arpa
|
||||
}
|
||||
prometheus :9153
|
||||
forward . /etc/resolv.conf
|
||||
cache 30
|
||||
loop
|
||||
reload
|
||||
|
|
|
@ -35,7 +35,7 @@ Verify if swap is enabled:
|
|||
sudo swapon --show
|
||||
```
|
||||
|
||||
If output is empthy then swap is not enabled. If swap is enabled run the following command to disable swap immediately:
|
||||
If output is empty then swap is not enabled. If swap is enabled run the following command to disable swap immediately:
|
||||
|
||||
```bash
|
||||
sudo swapoff -a
|
||||
|
|
|
@ -4,10 +4,22 @@ In this lab you will deploy the [DNS add-on](https://kubernetes.io/docs/concepts
|
|||
|
||||
## The DNS Cluster Add-on
|
||||
|
||||
Get the CoreDNS yaml:
|
||||
|
||||
```bash
|
||||
wget https://storage.googleapis.com/kubernetes-the-hard-way/coredns.yaml
|
||||
```
|
||||
|
||||
Edit the `coredns.yaml` file to change CoreDNS configuration to enable DNS resolution for external name:
|
||||
|
||||
```bash
|
||||
sed '/.*prometheus :9153/a \ \ \ \ \ \ \ \ forward . /etc/resolv.conf' coredns.yaml
|
||||
```
|
||||
|
||||
Deploy the `coredns` cluster add-on:
|
||||
|
||||
```bash
|
||||
kubectl apply -f https://storage.googleapis.com/kubernetes-the-hard-way/coredns.yaml
|
||||
kubectl apply -f coredns.yaml
|
||||
```
|
||||
|
||||
> Output:
|
||||
|
|
Loading…
Reference in New Issue