ocular
A tool for observing Kubernetes pods' statuses in real time.
Description
Often times it's very hard to translate a Kubernetes event to a concrete state, and that's the gap that ocular tries fill, i.e. return one of the following statuses:
created
building
unschedulable
scheduled
running
succeeded
failed
stopped
unknown
ocular returns as well a condensed information about the reason of that status.
Install
$ pip install -U ocular
Usage
import ocular
from kubernetes import client
api_client = client.api_client.ApiClient(configuration=...)
for pod_state in ocular.monitor(api_client,
namespace='polyaxon',
container_names=('polyaxon-experiment-job',),
label_selector='app in (workers,dashboard),type=runner'):
print(pod_state)
Results
...
>> {'status': 'unknown', 'message': 'Unknown pod conditions', 'details': {'event_type': 'ADDED', 'labels': ...
>> {'status': 'building', 'message': None, 'details': {'event_type': 'MODIFIED', 'labels': ...
>> {'status': 'building', 'message': 'PodInitializing', 'details': {'event_type': 'MODIFIED', 'labels': ...
>> {'status': 'building', 'message': 'PodInitializing', 'details': {'event_type': 'MODIFIED', 'labels': ...
>> {'status': 'running', 'message': None, 'details': {'event_type': 'MODIFIED', 'labels': ...
>> {'status': 'running', 'message': None, 'details': {'event_type': 'MODIFIED', 'labels': ...
>> {'status': 'succeeded', 'message': None, 'details': {'event_type': 'MODIFIED', 'labels': ...
...
License
Metadata
Release files for ocular 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ocular-0.1.7.tar.gz | 7.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ocular-0.1.7-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 14.8 kB
Release files / ocular-0.1.7.tar.gz
| Download URL | ocular-0.1.7.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8ff6b6330f5df4f0e52c30d90a815085f7f96468277468af3da8f191210bb626
|
|
BLAKE2b-256 checksum How to use checksums |
7675947e0c1dce363c3df37d4f4c609546a5eff05424b8a4b1309847b30a4282
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
|
Release files / ocular-0.1.7-py2.py3-none-any.whl
| Download URL | ocular-0.1.7-py2.py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
7779c6fb0a46b57eff634361a2052a429910be0e1b7c1c92984217eb8b384a97
|
|
BLAKE2b-256 checksum How to use checksums |
a2dadf069bdcfe6adedf772c424672c1c1d8929e3fb56294456e0f584a82a27a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
|