python/examples
Raj Bhargav e3b373fc1f 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 b295c2ddcbb838196823c4d7a55a67fd1d1dc290.

To avoid condition self.no_proxy is already present
2025-06-10 16:27:05 +05:30
..
dynamic-client replace utcnow with now, due to utcnow will be deprecated 2024-03-30 22:11:48 +08:00
notebooks Fix typos 2023-01-27 11:10:29 +08:00
watch Fix request_timeout example and doc 2023-06-07 22:25:06 +10:00
yaml_dir chore: move yaml files to correct folder 2023-09-11 19:10:57 +05:30
__init__.py 884: Cleanup examples folder 2019-09-12 22:46:07 -07:00
annotate_deployment.py chore: use f-string 2023-09-13 23:24:16 +05:30
api_discovery.py chore: use f-string 2023-09-13 23:24:16 +05:30
apply_from_dict.py example added for create_from_dict 2022-09-28 12:33:57 +06:00
apply_from_directory.py chore: use f-string 2023-09-13 23:24:16 +05:30
apply_from_single_file.py chore: use f-string 2023-09-13 23:24:16 +05:30
cluster_scoped_custom_object.py chore: use f-string 2023-09-13 23:24:16 +05:30
cronjob_crud.py change BatchV1beta1Api to BatchV1Api 2022-07-09 18:49:58 +08:00
deployment_create.py chore: use f-string 2023-09-13 23:24:16 +05:30
deployment_crud.py replace utcnow with now, due to utcnow will be deprecated 2024-03-30 22:11:48 +08:00
duration-gep2257.py Review feedback 2024-08-21 12:22:36 -04:00
enable_debug_logging.py Added proxy variable to read values from environment 2025-06-10 16:27:05 +05:30
in_cluster_config.py chore: use f-string 2023-09-13 23:24:16 +05:30
ingress_create.py Use v1 API in the ingress example 2021-11-29 11:11:12 -08:00
job_crud.py chore: use f-string 2023-09-13 23:24:16 +05:30
multiple_clusters.py chore: use f-string 2023-09-13 23:24:16 +05:30
namespaced_custom_object.py Removed the custom_object.py file and and added namespaced_custom_object.py 2021-04-30 13:08:18 +05:30
node_labels.py chore: use f-string 2023-09-13 23:24:16 +05:30
out_of_cluster_config.py chore: use f-string 2023-09-13 23:24:16 +05:30
patch_namespaced_config_map.py Add patch_namespaced_config_map example 2024-10-24 20:50:43 +08:00
pick_kube_config_context.py chore: use f-string 2023-09-13 23:24:16 +05:30
pod_config_list.py chore: use f-string 2023-09-13 23:24:16 +05:30
pod_exec.py chore: use f-string 2023-09-13 23:24:16 +05:30
pod_logs.py Update pod_logs.py 2025-02-16 12:54:15 +05:30
pod_portforward.py chore: use f-string 2023-09-13 23:24:16 +05:30
README.md Fix typos 2023-01-27 11:10:29 +08:00
remote_cluster.py chore: use f-string 2023-09-13 23:24:16 +05:30
rollout-daemonset.py Fix typos 2023-01-27 11:10:29 +08:00
rollout-statefulset.py Fix typos 2023-01-27 11:10:29 +08:00

Python Client Examples

This directory contains various examples of how to use the Python client. Please read the description at the top of each example for more information about what the script does and any prerequisites. Most scripts also include comments throughout the code.

Setup

These scripts require Python 2.7 or 3.5+ and the Kubernetes client which can be installed following the directions here.

Contributions

If you find a problem please file an issue.