magnum/magnum/common/pythonk8sclient/README.rst

36 lines
1.1 KiB
ReStructuredText

==========================
Kubernetes API client code
==========================
Overview
--------
This is Kubernetes API python client code. This code is generated by
swagger-codegen. Kubernetes provide swagger-spec to generate client code
for different versions. The specs live in Kubernetes repo.
See also
--------
* swagger-codegen: https://github.com/swagger-api/swagger-codegen
* Kubernetes swagger-spec: https://github.com/GoogleCloudPlatform/kubernetes/tree/master/api/swagger-spec
Steps to generate API client code
---------------------------------
Steps to generate Kubernetes client code for v1beta3:
* Clone the Kubernetes repo.
git clone https://github.com/GoogleCloudPlatform/kubernetes.git
* Clone the swagger-codegen repo.
git clone https://github.com/swagger-api/swagger-codegen.git
* Run below command to generate the API client code for Kubernetes.
java -jar ./swagger-codegen/modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i ./kubernetes/api/swagger-spec/v1beta3.json -l python -o ./KubernetesClientCode
Now you can check the code at location ./KubernetesClientCode.