You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added proxy variable to read values from environment
What type of PR is this?
/kind bug
What this PR does / why we need it:
This PRs will read environment variables assigned for proxy and no_proxy.
Update ws_client_test.py
Update configuration.py
What type of PR is this?
/kind bug
What this PR does / why we need it:
This PRs will read environment variables assigned for proxy and no_proxy.
Update configuration.py
Add debug logging doc and example
add .readthedocs.yaml config file
Added
Added insert_proxy_config.sh to edit configuration.py in client
Revert "Added insert_proxy_config.sh to edit configuration.py in client"
This reverts commit b295c2d.
To avoid condition self.no_proxy is already present
# Enabling Debug Logging in Kubernetes Python Client
2
+
3
+
This document describes how to enable debug logging, view logged information, and provides examples for creating, patching, and deleting Kubernetes resources.
4
+
5
+
## 1. Why Enable Debug Logging?
6
+
7
+
Debug logging is useful for troubleshooting as it shows details like HTTP request and response headers and bodies. These details can help identify issues during interactions with the Kubernetes API server.
8
+
9
+
---
10
+
11
+
## 2. Enabling Debug Logging
12
+
13
+
To enable debug logging in the Kubernetes Python client, follow these steps:
14
+
15
+
1.**Modify the Configuration Object:**
16
+
Enable debug mode by setting the `debug` attribute of the `client.Configuration` object to `True`.
17
+
18
+
2.**Example Code to Enable Debug Logging:**
19
+
Below is an example showing how to enable debug logging:
20
+
```python
21
+
from kubernetes import client, config
22
+
23
+
# Load kube config
24
+
config.load_kube_config()
25
+
26
+
# Enable debug logging
27
+
c = client.Configuration()
28
+
c.debug =True
29
+
30
+
# Pass the updated configuration to the API client
0 commit comments