Closed
Description
The *.py
files in the examples/
directory need updates for various reasons. Some of them could also use better file names and more commenting within the files (alternatively, there could be a README.md
that provides more information about setup and each file). Below are the files that I have tested and found issues for.
- create_deployment.py: seems redundant with
deployment_examples.py
andcreate_deployment_from_yaml.py
, I think it should be merged with one of those - create_deployment_from_yaml.py: fix the associated
nginx-deployment.yaml
which creates pods that go to a state of crashloopbackoff - create_thirdparty_resource.md: in progress of being replaced with a custom resource definition example with add example of using custom resources #848
- deployment_examples.py: add documentation
- example1.py: add documentation and use more descriptive filename
- example2.py: add documentation and use more descriptive filename
- example3.py: add documentation and use more descriptive filename
- example4.py: add documentation and use more descriptive filename, also the
print("Active host is %s" % configuration.host)
line throws the errorAttributeError: module 'kubernetes.client.configuration' has no attribute 'host'
-- in progress with https://github.com/kubernetes-client/python/pull/846/files - exec.py: add documentation explaining what this does
- in_cluster_config.py: create YAML for in-cluster pod
- manage_node_labels.py: add documentation that it is for minikube only
-
nginx-deployment.yaml: using this withfixed by Deprecate extensions/v1beta1 deployment #888create_deployment_from_yaml.py
creates nginx pods that immediately go to a state of crashloopbackoff - remote_cluster.py: the
list_pod_for_all_namespaces
method returns a 401 unauthorized error, probably needs RBAC?
Examples without issues:
- multiple_clusters.py
- job_examples.py (https://github.com/kubernetes-client/python/pull/786/files)