|
| 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. |
0 commit comments