How to Install and Use K8sGPT tool to analyze Kubernetes POD and Service Error

 

K8sGPT is a tool for scanning your kubernetes clusters, diagnosing and triaging issues in simple english.

It has SRE experience codified into it's analyzers and helps to pull out the most relevent information to enrich it with AI.

 Installation

At first get the binaries

 wget https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.1.6/k8sgpt_Linux_x86_64.tar.gz

Then create and copy api key from your openai account

 ./k8sgpt generate 

./k8sgpt auth

Paste the api key

Analyzers

K8sGPT uses analyzers to triage and diagnose issues in your cluster. It has a set of analyzers that are built in, but you will be able to write your own analyzers.

Built in analyzers

  • podAnalyzer
  • pvcAnalyzer
  • rsAnalyzer
  • serviceAnalyzer
  • eventAnalyzer
  • ingressAnalyzer

 Example

./k8sgpt analyze --explain --filter=Pod

If you want to show it using json output

./k8sgpt analyze -o json --explain --filter=Pod | jq .

 


 


Download Coding Interview Book and Get More Tutorials for Coding and Interview Solution: Click Here

Download System Design Interview Book and Get More Tutorials and Interview Solution: Click Here

Do you need more Guidance or Help? Then Book 1:1 Quick Call with Me: Click Here

Share on Google Plus

About Ashadullah Shawon

I am Ashadullah Shawon. I am a Software Engineer. I studied Computer Science and Engineering (CSE) at RUET. I Like To Share Knowledge. Learn More: Click Here
    Blogger Comment
    Facebook Comment

1 comments:

  1. If you are like most people , your car is probably one of your most valuable possessions. Whether you use it for commuting, running errands, or weekend road trips, your car is an important part of your life. But with regular use comes the inevitable build-up of dirt, dust, and grime. That's where a professional car cleaning service comes in.
    Here are some of the benefits of using a car cleaning service:
    Save time: Let's face it, cleaning your car can be a time-consuming and labour-intensive task. By using a car cleaning service, you can save yourself the hassle and leave the cleaning to the professionals. This means more free time for you to do the things you love.
    Thorough cleaning: A professional car cleaning service will ensure that your vehicle is cleaned thoroughly, both inside and out. This includes a detailed interior cleaning, as well as an exterior wash and wax. With their specialised tools and products, they can remove even the toughest dirt and stains.
    Protect your investment: Regular cleaning and detailing can help protect your car's paint and upholstery from damage. By removing dirt and grime, you can prevent scratches, rust, and other forms of wear and tear.
    Enhance your driving experience: A clean car not only looks great but also feels great to drive. With a freshly detailed interior, you'll enjoy a more comfortable and enjoyable driving experience.
    Affordable: Contrary to popular belief, professional car cleaning services are not just for luxury cars. There are a variety of service packages available to fit any budget. Plus, regular cleaning can actually save you money in the long run by extending the life of your car's components.

    ReplyDelete