Skip to content

aitbrahim/k8s_client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kubernetes Python Client

Python client for the kubernetes API.

Installation

From source:

git clone https://github.com/aitbrahim/k8s_client

python setup.py install

Example

list all pods:

client = CoreV1Api()

print("Listing pods for all namespace :")
resp = client.list_pods()

for i in resp.get('items'):
    try:
        print("%s\t%s\t%s" %
              (i['status']['podIP'], i['metadata']['namespace'], i['metadata']['name']))
    except KeyError:
        continue

About

Python client for k8s API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages