The 'oc logs' command failed to provide the log in a cluster using a proxy
Issue
-
The
oc logscommand failed with anet/http: TLS handshake timeouterrorError from server: Get "https://<node-IP>:10250/containerLogs/<namespace>/<pod-name>/<container>": net/http: TLS handshake timeout -
The
oc logscommand failed with atls: failed to verify certificate: x509: certificate signed by unknown authorityerrorError from server: Get "https://<node-IP>:10250/containerLogs/<namespace>/<pod-name>/<container>": tls: failed to verify certificate: x509: certificate signed by unknown authority -
The
oc logscommand failed with aForbiddenerrorError from server: Get "https://<node-IP>:10250/containerLogs/<namespace>/<pod-name>/<container>": Forbidden
Where the node-IP is the node hosting the container requested the logs from, the namespace is the namespace the pod is present, the pod-name is the name of the pod the container is present and the container is the actual container.
Environment
- Red Hat Openshift Container Platform (RHOCP)
- 4
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.