Skip to content

Commit 7239998

Browse files
authored
Merge pull request #87483 from DCChadwick/ocpbugs14361
OCPBUGS-14361: adding section on verifying cluster wide proxy configuration
2 parents 9b73a10 + 83a824e commit 7239998

File tree

2 files changed

+66
-2
lines changed

2 files changed

+66
-2
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * networking/configuring-a-custom-pki.adoc
4+
// * networking/enable-cluster-wide-proxy.adoc
5+
6+
:_mod-docs-content-type: PROCEDURE
7+
[id="nw-verify-proxy-configuration_{context}"]
8+
= Verifying the cluster-wide proxy configuration
9+
10+
After the cluster-wide proxy configuration is deployed, you can verify that it is working as expected. Follow these steps to check the logs and validate the implementation.
11+
12+
.Prerequisites
13+
14+
* You have cluster administrator permissions.
15+
* You have the {product-title} `oc` CLI tool installed.
16+
17+
.Procedure
18+
19+
. Check the proxy configuration status using the `oc` command:
20+
+
21+
[source,terminal]
22+
----
23+
$ oc get proxy/cluster -o yaml
24+
----
25+
26+
. Verify the proxy fields in the output to ensure they match your configuration. Specifically, check the `spec.httpProxy`, `spec.httpsProxy`, `spec.noProxy`, and `spec.trustedCA` fields.
27+
28+
. Inspect the status of the `Proxy` object:
29+
+
30+
[source,terminal]
31+
----
32+
$ oc get proxy/cluster -o jsonpath='{.status}'
33+
----
34+
+
35+
.Example output
36+
[source,terminal]
37+
----
38+
{
39+
status:
40+
httpProxy: http://user:xxx@xxxx:3128
41+
httpsProxy: http://user:xxx@xxxx:3128
42+
noProxy: .cluster.local,.svc,10.0.0.0/16,10.128.0.0/14,127.0.0.1,169.254.169.254,172.30.0.0/16,localhost,test.no-proxy.com
43+
}
44+
----
45+
46+
. Check the logs of the Machine Config Operator (MCO) to ensure that the configuration changes were applied successfully:
47+
+
48+
[source,terminal]
49+
----
50+
$ oc logs -n openshift-machine-config-operator $(oc get pods -n openshift-machine-config-operator -l k8s-app=machine-config-operator -o name)
51+
----
52+
53+
. Look for messages that indicate the proxy settings were applied and the nodes were rebooted if necessary.
54+
55+
. Verify that system components are using the proxy by checking the logs of a component that makes external requests, such as the Cluster Version Operator (CVO):
56+
+
57+
[source,terminal]
58+
----
59+
$ oc logs -n openshift-cluster-version $(oc get pods -n openshift-cluster-version -l k8s-app=machine-config-operator -o name)
60+
----
61+
62+
. Look for log entries that show that external requests have been routed through the proxy.

networking/enable-cluster-wide-proxy.adoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@ include::modules/nw-proxy-configure-object.adoc[leveloffset=+1]
2828

2929
include::modules/nw-proxy-remove.adoc[leveloffset=+1]
3030

31+
include::modules/nw-verify-proxy-configuration.adoc[leveloffset=+1]
32+
3133
[discrete]
3234
[role="_additional-resources"]
3335
== Additional resources
3436

35-
* xref:../security/certificates/updating-ca-bundle.adoc#ca-bundle-understanding_updating-ca-bundle[Replacing the CA Bundle certificate]
36-
* xref:../security/certificate_types_descriptions/proxy-certificates.adoc#customization[Proxy certificate customization]
37+
* xref:../security/certificates/updating-ca-bundle.adoc#ca-bundle-understanding_updating-ca-bundle[Understanding the CA Bundle certificate]
38+
* xref:../security/certificate_types_descriptions/proxy-certificates.adoc#customization[Proxy certificates]
3739
* link:https://access.redhat.com/solutions/7065528[How is the cluster-wide proxy setting applied to {product-title} nodes?]

0 commit comments

Comments
 (0)