Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add some instructions on how you can remove an unhealthy record set #1051

Merged
merged 1 commit into from
Nov 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions doc/user-guides/dnspolicy/dnshealthchecks.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,36 @@ status:
reason: 'Status code: 503'
status: 503
```

## Manually removing unhealthy records

If you have a failing health check for one of your gateway listeners and you would like to remove it from the DNS provider, you can do this by deleting the associated DNSRecord resource.

**Finding the correct record**

DNSRecord resources are kept in the same namespace as the DNSPolicy that configured and created them.

```bash
kubectl get dnsrecords.kuadrant.io -n <dns-policy-namespace>
```

As shown above, when a health check is failing, the DNSPolicy will show a status for that listener host to surface that failure:

```yaml
recordConditions:
t1a.cb.hcpapps.net:
- lastTransitionTime: "2024-11-27T14:00:52Z"
message: 'Not healthy addresses: [ae4d131ee5d7b4fb098f4afabf4aba4c-513237325.us-east-1.elb.amazonaws.com]'
observedGeneration: 1
reason: HealthChecksFailed
status: "False"
type: Healthy
```

The DNSRecord resource is named after the gateway and the listener name. So if you have a gateway called `ingress` and a listener called `example` you will have a `DNSRecord` resource named `ingress-example` in the same namespace as your DNSPolicy. So from this status you can get the hostname and find the associated listener on your gateway. You can then delete the associated DNSRecord resource.

```bash
kubectl delete dnsrecord.kuadrant.io <gateway-name>-<listener-name> -n <dns policy namespace>
```

Removing this resource will remove all of the associated DNS records in the DNS provider and while the health check is failing, the dns operator will not re-publish these records.
Loading