Add pods DNS resolution for external names
parent
7f3fb70d29
commit
c847d01b74
|
@ -61,6 +61,7 @@ data:
|
||||||
fallthrough in-addr.arpa ip6.arpa
|
fallthrough in-addr.arpa ip6.arpa
|
||||||
}
|
}
|
||||||
prometheus :9153
|
prometheus :9153
|
||||||
|
forward . /etc/resolv.conf
|
||||||
cache 30
|
cache 30
|
||||||
loop
|
loop
|
||||||
reload
|
reload
|
||||||
|
|
|
@ -35,7 +35,7 @@ Verify if swap is enabled:
|
||||||
sudo swapon --show
|
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
|
```bash
|
||||||
sudo swapoff -a
|
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
|
## 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:
|
Deploy the `coredns` cluster add-on:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
kubectl apply -f https://storage.googleapis.com/kubernetes-the-hard-way/coredns.yaml
|
kubectl apply -f coredns.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
> Output:
|
> Output:
|
||||||
|
|
Loading…
Reference in New Issue