Comments (8)
Hi there! I'm interested in working on implementing the --input feature and was exploring the proposed solution.
While going through the discussion, I noticed the suggestion of using two commands:
k8sgpt analyze --save
k8sgpt analyze --from-save <file_path>
I was wondering if the
k8sgpt analyze --save
command is intended to capture the cluster state using a similar approach as the following command:
kubectl get all --all-namespaces -o yaml > cluster_state.yaml
I'm thinking of implementing the functionality by:
Using
k8sgpt analyze --save
to save the initial state.Modifying
k8sgpt analyze
to accept the saved YAML file as input through the --from-save flag.
That would be a great start, but double check if there are any missing needed resources when running "get all". I don't think you will get any custom CRD resources that might be relevant for instance.
It would also be great if you can choose to mask any sensitive values such as "secrets" when running the "--save" command.
from k8sgpt.
It's a really interesting idea, but there would be a lot of "State" to download and capture locally.
It's possible, but we would need to really think about how we're doing that.
There might well be a few phases e.g.
Storing the initial data
1. k8sgpt analyze --save
Retrieving from files
2. k8sgpt analyze --from-save
from k8sgpt.
It's a really interesting idea, but there would be a lot of "State" to download and capture locally. It's possible, but we would need to really think about how we're doing that. There might well be a few phases e.g.
Storing the initial data
1. k8sgpt analyze --save
Retrieving from files
2. k8sgpt analyze --from-save
This would be an excellent solution.
Do you have any idea of how long this would take to implement?
from k8sgpt.
I don't think it's difficult technically, just a little time consuming, because you'd need to pull all of the resources that we have analysers for. Probably one of the easiest ways would be to extend the analyser interface to explain the types it needs to go get, then iterate through that and store locally into files.
I would say it's a few days of work
from k8sgpt.
Hi there! I'm interested in working on implementing the --input feature and was exploring the proposed solution.
While going through the discussion, I noticed the suggestion of using two commands:
k8sgpt analyze --save
k8sgpt analyze --from-save <file_path>
I was wondering if the k8sgpt analyze --save
command is intended to capture the cluster state using a similar approach as the following command:
kubectl get all --all-namespaces -o yaml > cluster_state.yaml
I'm thinking of implementing the functionality by:
Using k8sgpt analyze --save
to save the initial state.
Modifying k8sgpt analyze
to accept the saved YAML file as input through the --from-save flag.
from k8sgpt.
@the-tech-pilot how you doing on this? Anything you want to have peer reviewed or help with?
from k8sgpt.
@ronaldpetty @the-tech-pilot I have been working on getting something like this done for my internal use case and I got it working without too much of code changes using the client-go' fake client and prepend reactor.
I would be more than happy to contribute a full working version of this if it is acceptable.
from k8sgpt.
Right now, In my case, the files are named as kubectl_get_<resource>_[--namespace_<ns>]_-o_yaml.log
and a few lines at the tail end has metadata that I am stripping off.
from k8sgpt.
Related Issues (20)
- [bug]: run k8sgpt analyze will only complete successfully once , after trivy integration is active HOT 5
- [Feature]: support Ollama backend HOT 6
- [Bug]: invalid parent object in output list
- [Feature]: Support Custom AI backends. HOT 4
- [Bug]: "Ingress uses the secret radio/ as a TLS certificate which does not exist." HOT 1
- [Question]: Integration with Amazon bedrock issue HOT 11
- Report the use of components with vulnerabilities in k8sgpt
- [Feature]: Add Top K as a backend parameter
- [Question]: "An empty namespace may not be set during creation" error HOT 14
- [bug]: failed while calling AI provider openai HOT 3
- [Feature]: AWS integration to k8sgpt-operator.
- [Feature]: Support for AWS_PROFILE
- an empty namespace may not be set during creation for k8sgpt operator controller manager HOT 1
- [Bug]: Windows executable not working properly HOT 2
- [Feature]: Enable IBM Watsonx as one of the LLM AI Backends HOT 1
- Pass Headers while authenticating to AI backends HOT 1
- [BUG]: Unnecessary RBAC permissions
- docs: update "CLI Installation" section in README.md
- add openai organizationID config HOT 3
- [Feature]: Getting the error from Status field for HPA Analyzer
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 k8sgpt.