Skip to content

Interactive CLI tool that will fetch information for you on the fly from your k8s cluster

Notifications You must be signed in to change notification settings

JohnMops/k8snitch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

k8snitch

k8snitch is an interactive CLI tool designed to fetch information from your Kubernetes cluster on the fly.

Setup

  1. Clone the repository:

    git clone https://github.com/yourusername/k8snitch.git
    cd k8snitch
  2. Install dependencies:

    pip install -r requirements.txt
  3. Run the script:

    python3 k8snitch.py

    Alternatively, create an alias for easier access.

Functionality

Get Pods Metrics

  • Select this action: Choose to fetch container image information.
  • Select the namespace: Specify the namespace in the Kubernetes cluster.
  • Output format: Displays information in a formatted table.
  • Outputs:
    • Pod Name
    • CPU Cores
    • Memory Bytes

Get Container Images

  • Select this action: Choose to fetch container image information.
  • Select the namespace: Specify the namespace in the Kubernetes cluster.
  • Output format: Displays information in a formatted table.
  • Outputs:
    • Workload type
    • Workload name
    • Images running in each deployment/statefulset
    • Last update time of the resource

Get Resource Requests Information

  • Select this action: Choose to fetch resources requests information.
  • Select the namespace: Specify the namespace in the Kubernetes cluster.
  • Output format: Displays information in a formatted table.
  • Outputs:
    • Deployment/Statefulset name
    • Resource Type
    • CPU
    • Memory

Get Replica Count

  • Select this action: Choose to fetch resources requests information.
  • Select the namespace: Specify the namespace in the Kubernetes cluster.
  • Output format: Displays information in a formatted table.
  • Outputs:
    • Workload type: statefulset/deployment
    • Name of the workload
    • Namespace
    • Replica caount for the workload

Get Deployment Logs: None Sidecar

  • Select this action: Choose to fetch resources requests information.
  • Select the namespace: Specify the namespace in the Kubernetes cluster.
  • Select the deployment: Specify the deployment in the selected namespace.
  • Output format: Prints the logs to the terminal.
  • Outputs:
    • Logs print

Get StatefulSet Logs: None Sidecar

  • Select this action: Choose to fetch resources requests information.
  • Select the namespace: Specify the namespace in the Kubernetes cluster.
  • Select the statefulset: Specify the statefulset in the selected namespace.
  • Output format: Prints the logs to the terminal.
  • Outputs:
    • Logs print

More functionalities to be added in future updates.

Contributing

Contributions are welcome! Feel free to fork the repository and submit pull requests for new features, improvements, or bug fixes.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For questions or support, contact the project maintainer at [email protected].


This README.md provides an overview of k8snitch, including setup instructions, current functionality (specifically for fetching container images from Kubernetes), information on contributing, licensing details, and contact information. Adjust the details (such as email and repository URL) based on your actual repository and preferences.

About

Interactive CLI tool that will fetch information for you on the fly from your k8s cluster

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages