A couple of bash aliases and functions that I personally use to make my life easier when dealing with kubectl.
git clone https://github.com/KhaledSakr/kutectl
cd kutectl
make
This will show you a preview of all the aliases and functions that are going to be referenced in your bashrc. It's better to review them, for security reasons.
kubectl completion script is automatically installed to enable support for autocompletion in these commands.
These are all the currently supported aliases/functions.
Lists dem pods.
Lists dem nodes.
Lists dem deployments.
Lists dem services.
Describes a pod.
Supports autocompletion.
Describes a deployment.
Supports autocompletion.
Gets logs.
Supports autocompletion.
Gets all the logs for a specific deployment (including all replicas).
- $1 Deployment to get the logs of.
Supports autocompletion.
Scales a deployment.
- $1 Deployment to scale.
- $2 Replica count.
Supports autocompletion.
Gets a shell to a running container.
- $1 Pod to start the shell session on.
Supports autocompletion.
Edits a resource (using nano).
Supports autocompletion.
Applies a yaml file.
Feel free to submit a PR with additions/improvements.
This README is generated using the custom generate_md javascript file from annotations right in the .kutectl.bash file.
Run node generate_md.js
to autogenerate them.