-
-
Notifications
You must be signed in to change notification settings - Fork 466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
runtimes: enable log export feature #1471
runtimes: enable log export feature #1471
Conversation
@iwilltry42 PTAL when you can |
v1
├── k3d-test-server-0
│ ├── cluster-info.log
│ ├── containerd.log
│ ├── crictl-images.log
│ ├── crictl-ps.log
│ ├── kubectl-get-node.yaml
│ ├── kubectl-version.log
│ ├── log
│ │ ├── containers
│ │ │ ├── coredns-7448499f4d-8dhmx_kube-system_coredns-6dd51f354f8f27ff014ef38849e3ffcfaff1508c7042cd1425f4c7730a6eaaa7.log
│ │ │ ├── helm-install-traefik-crd-gj8kc_kube-system_helm-d769ed944dda3c7e9b130aa01da5094c093dd1e324d2446a4f10445d5f1c8542.log
│ │ │ ├── helm-install-traefik-h964r_kube-system_helm-8d911021b0aae5e12b0273185512a66342308fd73eee32562c213675afa34c13.log
│ │ │ ├── local-path-provisioner-5ff76fc89d-bjf4n_kube-system_local-path-provisioner-0b8f980454508a9f9bd2b9480b94736aa8c5fc0edf7652e9649cfa8b4ad36014.log
│ │ │ ├── metrics-server-86cbb8457f-zwrn7_kube-system_metrics-server-6c05dcf0fa7336f67ac8f2efe2c25f2dc97ee62a0cf3632fe70fbc05264c46a2.log
│ │ │ ├── svclb-traefik-rxrwz_kube-system_lb-port-443-4293306ac37d02a902620275e186abf243a0f84d948224d600dfc5e3626bbf6f.log
│ │ │ ├── svclb-traefik-rxrwz_kube-system_lb-port-80-dbec7113890731d8963a83205812fefbd53fdd907ab3240fa3733f39aaaab574.log
│ │ │ └── traefik-6b84f7cbc-hh6mh_kube-system_traefik-13e5435613b7e5f3c7026a403ae79128fea4c6ceb38a0305e3e9718277ca8a50.log
│ │ ├── k3d-entrypoints_240717122814.log
│ │ └── pods
│ │ ├── kube-system_coredns-7448499f4d-8dhmx_7078afe2-1e8f-443b-a4eb-d2fee1cd6956
│ │ │ └── coredns
│ │ │ └── 0.log
│ │ ├── kube-system_helm-install-traefik-crd-gj8kc_fb93c486-4511-4301-b53f-6794d447eea4
│ │ │ └── helm
│ │ │ └── 0.log
│ │ ├── kube-system_helm-install-traefik-h964r_8562b2fb-7182-462c-b44e-4ee578d8104f
│ │ │ └── helm
│ │ │ └── 0.log
│ │ ├── kube-system_local-path-provisioner-5ff76fc89d-bjf4n_00d2a204-7623-4595-a136-33038c3742a0
│ │ │ └── local-path-provisioner
│ │ │ └── 0.log
│ │ ├── kube-system_metrics-server-86cbb8457f-zwrn7_0be65e2c-bb1f-423f-9b6c-da41927a648a
│ │ │ └── metrics-server
│ │ │ └── 0.log
│ │ ├── kube-system_svclb-traefik-rxrwz_567fab59-c009-4639-83f4-c6e81f75a309
│ │ │ ├── lb-port-443
│ │ │ │ └── 0.log
│ │ │ └── lb-port-80
│ │ │ └── 0.log
│ │ └── kube-system_traefik-6b84f7cbc-hh6mh_9e65392d-4d3a-4290-aa28-7d1e3bab87b4
│ │ └── traefik
│ │ └── 0.log
│ └── ps-aef.log
├── k3d-test-server-0.log
├── k3d-test-serverlb
└── k3d-test-serverlb.log
It will generate a struct like this. |
2617d3f
to
d99a268
Compare
@iwilltry42 I was hoping if you could spare some time and take a look at this and see if this is acceptable addition to the tool. This can be really useful with kubernetes-sigs/e2e-framework#441 |
Hi @harshanarayana , sorry for letting you wait this long. Also, in the future it might be cool to add filters to choose which logs should/shouldn't be exported. |
fe9260f
to
875b098
Compare
@iwilltry42 Thanks for taking a look and getting back to me. And no worries about the delay in response. I can understand. I have moved the export sub command to the I have added a provision to pass the PTAL at the current state and let me know if we can work towards getting this merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with how it is now. We can always add filters in the future as needed. I was thinking of stripping down the export e.g. to just k3s logs (docker container logs), K3s component logs (containerd et al) or kube component logs (kube-system pods).
Thanks for your efforts!
875b098
to
1de7839
Compare
Understood. Let me get a Draft PR open with some of these changes and we can take this discussion there. Thanks for the merge @iwilltry42 |
What
This feature adds an ability to export Cluster logs using the
k3d
binaries.Why
Tools like
kind
has been supporting the ability to export logs from the cluster using their native tooling for a while. This ability to export the logs usingk3d
can be super helpful when doing local development and test experiments. Instead of having to individually collect the logs, this command can be one stop shop for all standard commands to be aggregated.Implications
This changes the
Runtime
interface and hence this is a backward incompatible change.