OpenDev Sysadmins bc312939ec OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:51:39 +00:00
2016-05-27 17:23:04 -04:00
2016-04-24 06:52:09 -04:00
2019-04-19 19:51:39 +00:00
2016-04-01 14:27:35 -04:00
2016-09-20 08:38:07 +02:00
2016-07-14 19:15:09 +08:00
2016-10-21 15:43:54 +00:00

python-k8sclient - 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

Prerequisites

You need to install required packages for swagger codegen. Please refer to https://github.com/swagger-api/swagger-codegen#prerequisites

Steps to generate API client code

Steps to generate Kubernetes client code for v1:

  • Clone the python-k8sclient repo:

    git clone https://git.openstack.org/openstack/python-k8sclient
* Clone the swagger-codegen repo. It is recommended to checkout a release

(e.g. v2.1.3) instead of using the master branch:

git clone https://github.com/swagger-api/swagger-codegen.git
cd swagger-codegen/
git checkout tags/v2.1.3
  • Build swagger-codegen:

    mvn package
  • Update the v1.json from latest Kubernetes release:

    curl -o ./k8sclient/templates/v1.json https://raw.githubusercontent.com/kubernetes/kubernetes/v1.2.2/api/swagger-spec/v1.json
  • Run below command to generate the API client code for Kubernetes:

    cd ..
    java -jar ./swagger-codegen/modules/swagger-codegen-cli/target/swagger-codegen-cli.jar \
        generate \
        -i ./k8sclient/templates/v1.json \
        -l python -o ./KubernetesClientCode

Now you can check the code at location ./KubernetesClientCode.

Description
Python API for Kubernetes
Readme 627 KiB
Languages
Python 99.9%
Shell 0.1%