You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 1, 2018. It is now read-only.
Is pykube prepared to be executed inside a pod and make calls to the Kubernetes API? I need to query it to know the state of a Job, and if it has not ended (no successful nor fail) I would like to wait until it happens.
Thanks so much!
The text was updated successfully, but these errors were encountered:
To give an official answer, yes, pykube is very capable of making calls within the cluster. The classmethod you link to is exactly the way to do it too.
I can vouch for pykube running in-cluster in production and it works great!
How do you use it within the cluster? I get an error because the api object does not have a config attributes.
MWE:
import pykube
api = pykube.KubeConfig.from_service_account()
pykube.Service.objects(api)
Error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.6/dist-packages/pykube/objects.py", line 17, in __call__
namespace = api.config.namespace
AttributeError: 'KubeConfig' object has no attribute 'config'
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello,
Is
pykube
prepared to be executed inside a pod and make calls to the Kubernetes API? I need to query it to know the state of a Job, and if it has not ended (no successful nor fail) I would like to wait until it happens.Thanks so much!
The text was updated successfully, but these errors were encountered: