Skip to content

Commit

Permalink
Update references in README
Browse files Browse the repository at this point in the history
  • Loading branch information
wvengen committed Jan 8, 2024
1 parent 3556012 commit d03ba6e
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,24 +74,22 @@ The `dig` should show the external load balancer IP address. The first `curl` sh
### Step 1: Install hairpin-proxy in your Kubernetes cluster

```shell
kubectl apply -f https://raw.githubusercontent.com/compumike/hairpin-proxy/v0.2.1/deploy.yml
kubectl apply -f https://raw.githubusercontent.com/q-m/hairpin-proxy/v0.4.0/deploy.yml
```

If you're using `ingress-nginx`, this will work as-is.
Note that this hairpin-proxy fork discovers ingress controllers and sets `TARGET_SERVER` automatically.

However, if you using an ingress controller other than `ingress-nginx`, you must change the `TARGET_SERVER` environment variable passed to the `hairpin-proxy-haproxy` container. It defaults to `ingress-nginx-controller.ingress-nginx.svc.cluster.local`, which specifies the `ingress-nginx-controller` Service within the `ingress-nginx` namespace. You can change this by editing the `hairpin-proxy-haproxy` Deployment and specifiying an environment variable:
Usually, CoreDNS will listen on port 53, but there are cases where listens on another port. In that case, set the environment variable `COREDNS_PORT` correspondingly.

```shell
kubectl edit -n hairpin-proxy deployment hairpin-proxy-haproxy

# Within spec.template.spec.containers[0], add something like:
env:
- name: TARGET_SERVER
value: my-ingress-controller.my-ingress-controller-namespace.svc.cluster.local
- name: COREDNS_PORT
value: '8053'
```

Usually, CoreDNS will listen on port 53, but there are cases where listens on another port. In that case, set the environment variable `COREDNS_PORT` correspondingly (in the same way as `TARGET_SERVER` above).

### Step 2: Confirm that your CoreDNS configuration was updated

```shell
Expand Down Expand Up @@ -133,5 +131,8 @@ To resolve this, we need to rewrite the DNS on the Node itself. The Node does no
To install this DaemonSet:

```shell
kubectl apply -f https://raw.githubusercontent.com/compumike/hairpin-proxy/v0.2.1/deploy-etchosts-daemonset.yml
kubectl apply -f https://raw.githubusercontent.com/q-m/hairpin-proxy/v0.4.0/deploy-etchosts-daemonset.yml
```

_untested with this fork_

0 comments on commit d03ba6e

Please sign in to comment.