OpenShift - List proxy servers using the oc get proxy command

by
Jeremy Canfield |
Updated: April 06 2025
| OpenShift articles
The oc get proxy command can be used to list the proxy servers, if you have any proxy servers configured. In this example, there is a proxy server named "cluster".
~]$ oc get proxy
NAME AGE
cluster 622d
The oc describe proxy cluster command can be used to display more information on the cluster proxy server (http://proxy.example.com in this example).
~]$ oc describe proxy cluster
Name: cluster
Namespace:
Labels: <none>
Annotations: <none>
API Version: config.openshift.io/v1
Kind: Proxy
Metadata:
Creation Timestamp: 2020-09-30T15:40:25Z
Generation: 1
Managed Fields:
API Version: config.openshift.io/v1
Fields Type: FieldsV1
fieldsV1:
f:spec:
.:
f:httpProxy:
f:httpsProxy:
f:noProxy:
f:trustedCA:
.:
f:name:
f:status:
.:
f:httpProxy:
f:httpsProxy:
Manager: cluster-bootstrap
Operation: Update
Time: 2020-09-30T15:40:25Z
API Version: config.openshift.io/v1
Fields Type: FieldsV1
fieldsV1:
f:status:
f:noProxy:
Manager: cluster-network-operator
Operation: Update
Time: 2022-02-02T14:20:38Z
Resource Version: 747167713
Self Link: /apis/config.openshift.io/v1/proxies/cluster
UID: 69f64d95-6665-4233-8ce5-813b2cf84e06
Spec:
Http Proxy: http://proxy.example.com
Https Proxy: http://proxy.example.com
No Proxy: .example.com
Trusted CA:
Name: user-ca-bundle
Status:
Http Proxy: http://proxy.example.com
Https Proxy: http://proxy.example.com
No Proxy: .cluster.local,.svc,.example.com,10.9.0.0/14,localhost
Events: <none>
If you have a cluster proxy, pods may by default use the cluster proxy. The following environment variables can be used to override the cluster proxy configuration so that a pod uses or does not use a proxy.
- HTTP_PROXY
- HTTPS_PROXY
- NO_PROXY
For example, you could include the HTTP_PROXY, HTTPS_PROXY and/or NO_PROXY variables in deployment.
~]$ oc get deployment my-deployment --output yaml
spec:
containers:
env:
- name: HTTPS_PROXY
value: https://proxy.example.com
- name: HTTP_PROXY
value: http://proxy.example.com
- name: NO_PROXY
value: .cluster.local,.example.com,access.redhat.com,localhost,quay.io,registry.connect.redhat.com,registry.redhat.io
Did you find this article helpful?
If so, consider buying me a coffee over at