This repository contains a collection of utility scripts designed to simplify managing your Kubernetes cluster.
To get started, clone the repository and give executable permissions to the scripts if necessary:
git clone https://github.com/xstar97/cluster-scripts ./scriptsedit the /home/vscode/.config/fish/config.fish for example if using the dev container in vscode like this:
if status is-interactive
# Commands to run in interactive sessions can go here
source $PWD/scripts/utils.sh
endyou can alternatively just run the command manually yourself....
source $PWD/scripts/utils.shTo view the available commands and get detailed usage information, run:
$PWD/scripts/utils.shThe -h flag provides a description of each function along with example usage.
example:
$PWD/scripts/utils.sh -h dnsoutputs:
Function: dns
Description: Get cluster urls from a chart.
Example: dns chart [namespace]
Copy the alias file in your own repo and rename it to aliases.yaml and edit/add the commands you like. Now you can run:
gen_alias --config /path/to/aliases.yamlthis will create alias commands for the utils script for example:
utilsTo ensure your scripts are up-to-date, use the following command to pull the latest changes:
updateScriptsor...
git --git-dir=./scripts/.git --work-tree=./scripts pullFeel free to contribute by submitting issues and pull requests. For major changes, please open an issue first to discuss what you would like to change.