GithubHelp home page GithubHelp logo

esin / kubectlsafe Goto Github PK

View Code? Open in Web Editor NEW
44.0 5.0 6.0 11 KB

Safe operations in kubectl with plugin kubectlsafe

Shell 100.00%
kubernetes kubernetes-deployment kubernetes-operator bash-script bash kubectl-plugin kubectl-plugins kubectl

kubectlsafe's Introduction

kubectlsafe

Plugin for kubectl for safe write operations in Kubernetes

Before every write (apply, create, etc...) operation, kubectl will ask you about your choice

Installation

It's simple as 1, 2, 3:

Download kubectl-safe to /usr/local/bin, add eXecutable bit and add to your aliases

sudo wget https://raw.githubusercontent.com/esin/kubectlsafe/master/kubectl-safe -O /usr/local/bin/kubectl-safe
sudo chmod +x /usr/local/bin/kubectl-safe
echo "alias kubectl='kubectl safe'" >> $HOME/.bashrc
. $HOME/.basrc

If you don't have root access, you can do like this:

mkdir $HOME/bin
wget https://raw.githubusercontent.com/esin/kubectlsafe/master/kubectl-safe -O $HOME/bin/kubectl-safe
chmod +x $HOME/bin/kubectl-safe
echo "alias kubectl='kubectl safe'" >> $HOME/.bashrc
. $HOME/.basrc

That's all

Example

andrey@andreypc:~$ kubectl delete pod nginx-549cfdbc34-jdos4
Current context is kube-prod. Show must go on? y #Only after that operation will begin
pod "nginx-549cfdbc34-jdos4" deleted

Contributions

Feel free to ask questions and apply new ideas

Happy kubectling! :)

kubectlsafe's People

Contributors

esin avatar tibebejs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

kubectlsafe's Issues

Distribute via krew?

๐Ÿ‘‹ Hello, maintainer of the kubectl plugin manager krew here.

What do you think about making your plugin available via krew? You would benefit from

  • Greater visibility due krew's large user basis.
  • Easier installs.
  • Seamless upgrades for new plugin versions.

Krew already has over 60 plugins and more are coming in. See our development guide if you're interested. Please also consult our naming guide to see if your plugin already fulfills our naming requirements.

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.