You can view the different command options through
k8sgpt --help
Kubernetes debugging powered by AI
Usage:
k8sgpt [command]
Available Commands:
analyze This command will find problems within your Kubernetes cluster
auth Authenticate with your chosen backend
completion Generate the autocompletion script for the specified shell
filters Manage filters for analyzing Kubernetes resources
generate Generate Key for your chosen backend (opens browser)
help Help about any command
integration Integrate another tool into K8sGPT
serve Runs k8sgpt as a server
version Print the version number of k8sgpt
Flags:
--config string config file (default is $HOME/.k8sgpt.yaml)
-h, --help help for k8sgpt
--kubeconfig string Path to a kubeconfig. Only required if out-of-cluster.
--kubecontext string Kubernetes context to use. Only required if out-of-cluster.
Use "k8sgpt [command] --help" for more information about a command.
Authenticate with OpenAI
First, you will need to authenticate with your chosen backend. The backend is the AI provider such as OpenAI's ChatGPT.
Next, generate a token from the backend:
k8sgpt generate
This will provide you with a URL to generate a token, follow the URL from the command line to your browser to then generate the token.
For a more engaging experience and a better understanding of the capabilities of k8sgpt and LLMs (Large Language Models), run the following command:
k8sgpt analyse --explain
Congratulations! you have successfully created a local kubernetes cluster, deployed a "broken Pod" and analyzed it using k8sgpt.
K8sGPT can be installed as an Operator inside the cluster. For further information, see the documentation.