---
title: Patching existing ingress objects
---

# Patching existing ingress objects {#configuring-ingress-cluster-patch-fields}

You can update or modify the following fields of existing `Ingress` objects without recreating the objects or disrupting services to these objects:

- Specifications
- Host
- Path
- Backend services
- SSL/TLS settings
- Annotations

## Patching Ingress objects to resolve an ingressWithoutClassName alert {#nw-patch-fields-example_configuring-ingress-cluster-patch-fields}

To prevent certain routing issues, you must define define the `ingressClassName` field for each `Ingress` object.

> [!NOTE]
> Approximately 24 hours after you create an `Ingress` object, the Ingress Controller sends you an `ingressWithoutClassName` alert to remind you to set the `ingressClassName` field.

The procedure demonstrates patching the `Ingress` objects with a completed `ingressClassName` field to ensure proper routing and functionality.

**Procedure**

1. List all `IngressClass` objects:

   ```terminal
   $ oc get ingressclass
   ```
2. List all `Ingress` objects in all namespaces:

   ```terminal
   $ oc get ingress -A
   ```
3. Patch the `Ingress` object by running the following command. This command patches the `Ingress` object to include the desired ingress class name.

   ```terminal
   $ oc patch ingress/<ingress_name> --type=merge --patch '{"spec":{"ingressClassName":"openshift-default"}}'
   ```

   - `<ingress_name>`: Replace `<ingress_name>` with the name of the `Ingress` object.
