Skip to content
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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

harshanarayana
Copy link
Contributor

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 using k3d 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.

If this is an acceptable change to be included, I will be more than happy to take care of including a few more things to the supported export of logs.

@harshanarayana
Copy link
Contributor Author

@iwilltry42 PTAL when you can

@harshanarayana
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant