Comments (6)
Hi @dasch , thanks for bringing this up. Kubeclient doesn't support this feature yet. Contributions are welcome :)
cc @simon3z
from kubeclient.
The kubernetes side is lacking of a couple features that I'd need to make the log collection really usable for my use-case. Which means that for me at this time the kubeclient side is not interesting yet. But obviously if there's a contribution we'll gladly accept it.
from kubeclient.
@simon3z Out of interest, what log functionality do you think is lacking in Kubernetes? There's an open issue (kubernetes/kubernetes#12447) to collect some ideas to make log endpoint more useful - good to hear your thoughts there if you have ideas.
from kubeclient.
@abonas, I was looking at the code to implement this functionality. The way that Kubeclient::Client
is implemented, it seems pretty straightforward to have CRUD-like functionality for the main objects, like Services, Pods, Events, etc.
But log retrieval uses an endpoint of the form GET /api/v1/namespaces/{namespace}/pods/{name}/log
, which is an endpoint that is specific to the Pod object. I don't see an elegant way of adding functionality specific to one of the objects that's not in the others.
Do you have a plan/design in mind for how to add that sort of functionality? Or should I come up with something that seems sane to me, and we can hash out the details in a pull request?
from kubeclient.
@jonmoter Hi, I didn't think yet how to implement it, and I'd like to hear first @simon3z which log functionality he is looking for in k8s.
Generally speaking, the client doesn't have to mimic the way the server api is structured. And the objects themselves that are constructed on client side (pod, etc.) have only data, not logic such as going to server again - I think it's better to keep them clean from server connections, etc.
Hence, in theory, you could have something like client.get_log (namespace, pod_name) , but this is really a brief thought on the topic.
from kubeclient.
@abonas PR #121 is my first pass at implementing functionality to get (or watch) logs from a pod. The Kubernetes API doesn't expose any more functionality than what I've implemented. So that's all we can do for now.
from kubeclient.
Related Issues (20)
- v4.11.0 was released but isn't noted in the CHANGELOG
- Informer.watch is not guaranteed to receive all changes during restart
- CVE-2022-44571 (High) detected in rack-2.2.3.gem - autoclosed HOT 1
- CVE-2022-44570 (High) detected in rack-2.2.3.gem - autoclosed HOT 1
- CVE-2023-22796 (High) detected in activesupport-7.0.2.3.gem - autoclosed HOT 1
- CVE-2022-44572 (High) detected in rack-2.2.3.gem - autoclosed HOT 1
- Word breaking fails for kind `APIService` HOT 1
- CVE-2023-27530 (High) detected in rack-3.0.4.1.gem - autoclosed HOT 1
- CVE-2023-27539 (Medium) detected in rack-3.0.4.1.gem - autoclosed HOT 1
- 6 tests fail KubeclientConfigTest#test_explicit_secure Expected false to be truthy. HOT 3
- Dependency Dashboard
- Is it possible to fetch ingress information? HOT 2
- getting large resources on slow connection is slow
- v5 first request is ~10x slower than v4
- CVE-2023-38037 (Medium) detected in activesupport-7.0.4.3.gem - autoclosed HOT 1
- CVE-2023-51774 (High) detected in json-jwt-1.15.3.gem - autoclosed HOT 1
- CVE-2024-25126 (Medium) detected in rack-3.0.7.gem - autoclosed HOT 1
- CVE-2024-26146 (Medium) detected in rack-3.0.7.gem - autoclosed HOT 1
- CVE-2024-26141 (Medium) detected in rack-3.0.7.gem - autoclosed HOT 1
- documentation doesn't match current Ruby gem exposed version(s) 4.11.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kubeclient.