1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/nw-patch-fields-example.adoc
2025-01-29 08:57:16 -05:00

38 lines
1.3 KiB
Plaintext

// Module included in the following assemblies:
//
// * networking/configuring_ingress_cluster_traffic/configuring-ingress-cluster-patch-fields.adoc
:_mod-docs-content-type: PROCEDURE
[id="nw-patch-fields-example_{context}"]
= Patching Ingress objects to resolve an ingressWithoutClassName alert
The `ingressClassName` field specifies the name of the `IngressClass` object. You must define the `ingressClassName` field for each `Ingress` object.
If you have not defined the `ingressClassName` field for an `Ingress` object, you could experience routing issues. After 24 hours, you will receive an `ingressWithoutClassName` alert to remind you to set the `ingressClassName` field.
.Procedure
Patch the `Ingress` objects with a completed `ingressClassName` field to ensure proper routing and functionality.
. List all `IngressClass` objects:
+
[source,terminal]
----
$ oc get ingressclass
----
. List all `Ingress` objects in all namespaces:
+
[source,terminal]
----
$ oc get ingress -A
----
. Patch the `Ingress` object:
+
[source,terminal]
----
$ oc patch ingress/<ingress_name> --type=merge --patch '{"spec":{"ingressClassName":"openshift-default"}}'
----
+
Replace `<ingress_name>` with the name of the `Ingress` object. This command patches the `Ingress` object to include the desired ingress class name.