Git Product home page Git Product logo

kubectlxtra's Introduction

KubectlXtra

kubectlxtra is a wrapper that extends the functionality of kubectl command-line tool, providing additional features and simplifications for managing Kubernetes clusters.

"📰 Extra! Extra! Read all about it! KubectlXtra is Here for your convenience."

"💁 So this is kubectl but extra, Yeah, pretty much."

Commits Issues Releases

Features

  • Login to Kubernetes clusters with ease using enhanced login/logout functionality.
  • Display available namespaces with detailed information about access rights.
  • Switch between namespaces seamlessly for efficient cluster management.

Notes

  • KubectlXtra simplifies Kubernetes cluster management tasks by providing enhanced functionalities on top of kubectl.
  • It aims to improve user experience and efficiency when working with Kubernetes clusters.
  • The script is designed to seamlessly integrate with existing Kubernetes workflows.

Requirements

  • kubectl installed.
  • awk installed.

Installation

To install KubectlXtra, follow these simple steps:

curl -LO "https://github.com/alexbaeza/kubectlxtra/raw/main/kubectlxtra.sh"
chmod +x kubectlxtra.sh
mv kubectlxtra.sh /usr/local/bin/kubectlxtra

Note: If you do not have root access on the target system, you can still install kubectlxtra to the ~/.local/bin directory:

curl -LO "https://github.com/alexbaeza/kubectlxtra/raw/main/kubectlxtra.sh"
chmod +x kubectlxtra.sh
mv ./kubectlxtra.sh ~/.local/bin/kubectl
# and then append (or prepend) ~/.local/bin to $PATH

Usage and Examples

To use kubectlxtra, execute the script with desired commands:

# Login to a Kubernetes cluster with a service-account-token
kubectlxtra login --server=<server_url> --token=<service_account_token> [other_options...]

> kubectlxtra login --server=https://example.com --token=XXXXXXXXXXXXX
# Logout from a Kubernetes cluster and delete credentials
kubectlxtra logout
# Display available namespaces
kubectlxtra namespaces
# Switch to a different namespace
kubectlxtra namespace <target_namespace>

> kubectlxtra namespace kube-system
# Read help
kubectlxtra help

Kubectl Native commands are still supported

kubectlxtra only aims to enhance the functionality of kubectl building on top of it, therefore the native kubectl functions are supported and untouched.

# Display cluster info
kubectlxtra cluster-info
kubectlxtra get pods
# List resources
kubectlxtra get nodes
kubectlxtra get pods
kubectlxtra get deployments
kubectlxtra get svc
...and others
# With namespace selectors
kubectlxtra get pods -A
kubectlxtra get pods --all-namespaces
kubectlxtra get pods -n kube-system
# Logs
kubectlxtra logs mypod-5b6f77bb46-vp6ms
# Describe resources
kubectlxtra describe pod mypod-5b6f77bb46-vp6ms
kubectlxtra describe deployment mypod-5b6f77bb46-vp6ms
kubectlxtra describe rs mypod-5b6f77bb46-vp6ms

These commands showcase common usage scenarios for managing Kubernetes clusters with KubectlXtra.

Recommendations

I personally highly recommend adding the k alias to kubectlxtra.

🚀 You'll feel like you're saving precious seconds by typing at the speed of light.

alias k='kubectlxtra'

❤️ Contributing

We welcome contributions from the community! If you have any feature suggestions or bug fixes, please feel free to raise an issue to discuss it. You can also open a pull request (PR) to contribute your changes. Before submitting a PR, make sure to check the existing issues and PRs to avoid duplication. We appreciate your contributions!

License

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

kubectlxtra's People

Contributors

alexbaeza avatar semantic-release-bot avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.