The behavior in kubectl is to run the exec command against the default container. However, this needs to be specified with the client call. Add a comment in the example for this. |
||
|---|---|---|
| .. | ||
| dynamic-client | ||
| notebooks | ||
| watch | ||
| yaml_dir | ||
| __init__.py | ||
| annotate_deployment.py | ||
| api_discovery.py | ||
| apply_from_dict.py | ||
| apply_from_directory.py | ||
| apply_from_single_file.py | ||
| cluster_scoped_custom_object.py | ||
| configmap-demo-pod.yml | ||
| cronjob_crud.py | ||
| deployment_create.py | ||
| deployment_crud.py | ||
| in_cluster_config.py | ||
| ingress_create.py | ||
| job_crud.py | ||
| multiple_clusters.py | ||
| namespaced_custom_object.py | ||
| nginx-deployment.yaml | ||
| node_labels.py | ||
| out_of_cluster_config.py | ||
| pi-job.yaml | ||
| pick_kube_config_context.py | ||
| pod_config_list.py | ||
| pod_exec.py | ||
| pod_portforward.py | ||
| README.md | ||
| remote_cluster.py | ||
| rollout-daemonset.py | ||
| rollout-statefulset.py | ||
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 prequisites. 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.