April 2018
Intermediate to advanced
468 pages
14h 34m
English
I'll use Python again, so you can compare using the official Python client with rolling your own. Python has a module called subprocess that can run external processes such as Kubectl and capture the output. Here is a Python 3 example running Kubectl on its own and displaying the beginning of the usage output:
>>> import subprocess
>>> out = subprocess.check_output('kubectl').decode('utf-8')
>>> print(out[:276])
Kubectl controls the Kubernetes cluster manager. Find more information at https://github.com/kubernetes/kubernetes.
Here are some basic commands for beginners:
The check_checkout() ...
Read now
Unlock full access