Code Monkey home page Code Monkey logo

fubectl's Introduction

fubectl

Because it's fancy-kubectl !

Prerequisites?

Installation

You can directly download the fubectl.source and save it in some directory.

Download:

curl -LO https://rawgit.com/kubermatic/fubectl/master/fubectl.source

then add to your .bashrc/.zshrc file:

[ -f <path-to>/fubectl.source ] && source <path-to>/fubectl.source

Alternatively you can install fubectl using the ZSH plugin manager of your choice.

What can it do?

k - alias for kubectl

Like g for git but 133% more effective!

Examples:

  • k get nodes
  • k get pods
  • k version --short

Usage: kGif


kw - alias for 'watch kubectl'

Examples:

  • kw nodes
  • kw pods
  • kw nodes,pods,services

kall - All pods in all namespaces

Get all pods

Usage: kGif


kwall - Watch all pods in all namespaces

Watch all pods in all namespaces every 2 seconds.

Usage: kGif


kdes - Describe a resource

Examples:

  • kdes pod
  • kdes service
  • kdes nodes

Usage: kGif


kdel - Delete a resource

Examples:

  • kdel pod
  • kdel secret
  • kdel pvc

Usage: kGif


klog - Print the logs for a container in a pod

Examples:

  • klog - Print the last 10 lines
  • klog 100 - Print the last 100 lines
  • klog 250 -f - Print the last 250 lines and follow the output, like tail -f
  • klog 50 -p - Print the last 50 lines of the previous container

Usage: kGif


kex - Execute a command in a container

Examples:

  • kex bash - Start a bash in a container
  • kex date - Print the date in a container

Usage: kGif


kfor - Forward one or more local ports to a pod

Examples:

  • kfor 8000 - Forwards port 8000 to a pod
  • kfor 8000:80 Fowards local port 8000 to a pod's port 80

Usage: kGif


ksearch - Search for string in resources

Examples:

  • // TODO

Usage: kGif


kcl - Displays one or many contexts from the kubeconfig file

Context list

Usage: kGif

kcs - Sets the current context

Usage: kGif


kcns - Switch the default namespace

kcns - Set the current default namespace from list kcns kube-system - Set kube-system as default namespace immediately

Usage: kGif

kdebug - Start a debugging Pod in a Cluster

Usage: kGif


kp - Open the Kubernetes dashboard

Opens localhost:8001/ui in your browser and runs kubectl proxy


Extra!

Do you want to have the current kubecontext in your prompt?:

export PS1="\[$(kube_ctx_name)\] $PS1"

for the current namespace (this is currently slow, because it calls kubectl every time):

export PS1="\[$(kube_ctx_namespace)\] $PS1"

Customization

fubectl can be customized via following environment variables

  • FUBECTL_WATCH_CMD - alterative watch command, e.g. viddy
  • FUBECTL_NO_KCL - disable kcl alias, since it may conflict with KCL language CLI

Troubleshooting

If you encounter issues file an issue or talk to us on the #fubectl channel on the Kubermatic Slack.

Contributing

Thanks for taking the time to join our community and start contributing!

Feedback and discussion are available on Kubermatic Slack.

Before you start

  • Please familiarize yourself with the Code of Conduct before contributing.
  • See CONTRIBUTING.md for instructions on the developer certificate of origin that we require.

Pull requests

  • We welcome pull requests. Feel free to dig through the issues and jump in.

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.