python
python copied to clipboard
Official Python client library for kubernetes
#### What type of PR is this? /kind feature #### What this PR does / why we need it: This allows to recursively convert ResourceFields to dicts. #### Does this...
Hello Kubernetes Python Community, I would like to ask for a help about what is the intended way to close the watch stream immediately. Consider my simple reproducible example python3...
Lets assume the bellow scenario: the patch replaces existing resources, it there any 'merge' ? 'op': 'merge' ? ``` apps_v1_api = client.NetworkingV1Api() annotations = [ { 'op': 'add', # You...
annotating ingress with external DNS annotations removes existing annotations from ingress any new annotation with PATCH overwrites existing. ``` annotations = [ { 'op': 'add', # You can try different...
**What happened (please include outputs or screenshots)**: #### kubetest3.py ```py import yaml from kubernetes import client,config,utils config.load_kube_config() k8s_client = client.ApiClient() yaml_file = 'src/assets/zap-api-scan.yaml' utils.create_from_yaml(k8s_client,yaml_file,verbose=True) ``` #### zap-api-scan.yaml ```yaml # SPDX-FileCopyrightText:...
I'm not certain I ran the script correctly, but I am in need of a release that contains the FIPS fix https://github.com/kubernetes-client/python/pull/1854 ``` git checkout release-24.0 git cherry-pick -n 51badbcdbb3a905b9f79a60fc231ce69ec7e4c4a...
Traceback: Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 2309, in __call__ return self.wsgi_app(environ, start_response) File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 2295, in wsgi_app response = self.handle_exception(e) File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1741, in handle_exception...
**What is the feature and why do you need it**: **Describe the solution you'd like to see**: Similar to the utils.create_from_yaml I would like to also have a delete_from_yaml function...
#### What type of PR is this? /kind feature #### What this PR does / why we need it: Currently, under python 3, the WSClient decodes all data via UTF-8....
**What happened (please include outputs or screenshots)**: While using the following `pod_logs = v1.read_namespaced_pod_log(name=pod_name, namespace=namespace)`. I receive the error: ``` File "/opt/app/batch/python_virt/venv_app/lib64/python3.11/site-packages/kubernetes/client/rest.py", line 229, in request r.data = r.data.decode('utf8') ^^^^^^^^^^^^^^^^^^^^^...