Goyoo / node-k8s-client

kubernetes client of node.js
MIT License
164 stars 59 forks source link

[Feature] Add possibility to fetch pod logs using the REST API #21

Closed laddi closed 8 years ago

laddi commented 8 years ago

The problem is obvious, calling K8s.api({ ... }).get('namespaces/xxx/pods/yyy/logs') will always throw an error since the result is plaintext and not application/json. Not sure how to handle this properly, though...

sputnick commented 8 years ago

In other words the problem is the "resolve(JSON.parse(data));" in the get method. Using post doesn't help.

mmoonn2 commented 8 years ago

Sorry This is my fault

Please upgrate module to 0.4.9 Use log function

K8s.api({ ... }).log('namespaces/xxx/pods/yyy/logs')
sputnick commented 8 years ago

Awesome! Thanks for the quick help.

laddi commented 8 years ago

Thanks a bunch, especially for a speedy reply and fix! 😄