mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 21:46:22 +01:00
42 lines
1.3 KiB
Plaintext
42 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
|
|
|
|
[role="_abstract"]
|
|
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
|
|
|
|
. 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 by running the following command. This command patches the `Ingress` object to include the desired ingress class name.
|
|
+
|
|
[source,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.
|