python
python copied to clipboard
Official Python client library for kubernetes
**What happened (please include outputs or screenshots)**: Code: ``` from kubernetes import client, config from kubernetes.stream import stream config.load_incluster_config() api = client.CoreV1Api() data_stream = stream( api.connect_get_namespaced_pod_exec( "hello-world", "default", container="hello-world", command=["sh",...
https://github.com/kubernetes-client/python/blob/a6d44ff625b5e8d8ad380a70245d40fa3d5472b2/examples/pod_portforward.py#L32 Please, how this works if one would like to create a portforward, and then use another library such as Kafka client or Redis client to communicate through the port...
I would like to be able to spin up multiple port forwards at the same time if possible. E.g. Using the kubectl CLI command form of `kubectl --context port-forward -n...
**What is the feature and why do you need it**: kubeconfig support the cluster option [proxy-url](https://kubernetes.io/docs/reference/config-api/kubeconfig.v1/#Cluster). I think it would be useful if function like `load_kube_config` would use that to...
#### What type of PR is this? /kind bug #### What this PR does / why we need it: This PR fixes an OverflowError caused by the readline_channel method in...
It would be great of the python client to add inline type hints, so that e.g. mypy can detect issues
See also https://github.com/kubernetes-client/python/issues/340#issuecomment-526249075 (was closed for inactivity, NOT resolved) See also #63 **Motivation** It is sometimes useful to be able to load Python objects from JSON, for example to read...
patch_namespaced_deployment_scale returns None instead of 0 when scaling a deployment to 0 replicas
**What happened (please include outputs or screenshots)**: After scaling down a deployment to 0 replicas using **patch_namespaced_deployment_scale**, the resulting V1ScaleSpec replicas is None instead of 0. e.g. With this piece...
This is a dupe of https://github.com/kubernetes-client/python/issues/1486 which was closed but which was never tackled. Feel free to re-open that one and close this one **What is the feature and why...
**What happened (please include outputs or screenshots)**: I did a lot of searching on-line, and I couldn't find a trivial way to obtain a list of pods belonging to a...