microk8s
microk8s copied to clipboard
Add cluster-info dump output directory
Summary
Closes #3255
After running microk8s inspect a file is created called cluster-info-dump that contains the output from kubectl cluster-info dump.
The issue is this file contains a mix of json and plain text, making it very difficult to parse (by humans or programatically).
By passing an output-directory
parameter to the cluster-info dump
command, kubectl will split the output into multiple files, making the output much easier to browse and parse.
New file structure looks something like this
.
├── k8s
│ ├── cluster-info-dump
│ └── cluster-info-dump-all
│ ├── default
│ │ ├── my-pod-1-77d9bd5bb-bsf9v
│ │ │ └── logs.txt
│ │ ├── my-pod-2-fwvmk-m2w27
│ │ │ └── logs.txt
│ │ ├── daemonsets.json
│ │ ├── deployments.json
│ │ ├── events.json
│ │ ├── pods.json
│ │ ├── replicasets.json
│ │ ├── replication-controllers.json
│ │ ├── services.json
│ ├── nodes.json
Changes
Adding --output-directory
to kubectl cluster-info dump
command. See docs
Testing
Running script locally generates "legacy" cluster-info-dump
AND the cluster-info-dump-dir
directory.
Possible Regressions
I made sure to leave cluster-info-dump
in the inspection report so that there are no possible regressions. I can remove if needed of course as I think this adds to the time it takes to generate an inspection-report.
Checklist
- [x] Read the contributions page.
- [x] Submitted the CLA form, if you are a first time contributor.
- [ ] The introduced changes are covered by unit and/or integration tests.
Notes
Having trouble submitting the CLA form. Maybe because I have no idea what to put for the project manager or contact? 🤷
Hi @SeanReece I would be interested in seeing the tool you are working on for processing inspection reports.
You can set @AlexsJones "Alex Jones" in the "Canonical Product Manager" field.
Hey @ktsakalozos Unfortunately nothing open source so can't say too much about it but it's nothing super high tech.
We're shipping virtual appliances that we don't have access to. So when something goes wrong a customer would generate a bundle for us that, amongst other things, includes the inspection report. We'd like to write a little app that parses the bundle/inspection report and can easily show what pods are running and their status, etc.
This is something we can do ourselves when we generate this "bundle", but I thought it would be useful for the inspection report since the current cluster-info-dump
is a bit of a nightmare to read for larger clusters 😄
Still having issues signing the CLA form. I created a launchpad account and put in my username, but noticed that the form gets a 404 when looking up my launchpad id. Feeling like a bit of an idiot but I don't see where I'd find my "id", just my username. Sorry!
After logging into launchpad, click on your name on the top right to see the user information (https://launchpad.net/~<user_id>). The user ID is shown on the overview of the user information.
Cloud you try filling the CLA form one more time?
Hi @SeanReece, the issues with signing the CLA have been resolved, can you try one more time and we can have this merged?
Thank you for the contribution, and apologies for the troubles.
Any updates on signing the CLA @SeanReece? The 1.25 is a couple of weeks away and we would like to include this patch in it.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.