From 4df6c0e163c1ec30705b657eb9479712cee7e509 Mon Sep 17 00:00:00 2001 From: Frank Sauerburger <frank@sauerburger.com> Date: Tue, 11 Jun 2024 18:31:52 +0200 Subject: [PATCH] Add usage and shorthand commands --- .gitignore | 1 + README.md | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) diff --git a/.gitignore b/.gitignore index c18dd8d..cafd598 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ __pycache__/ +.venv/ \ No newline at end of file diff --git a/README.md b/README.md index 62c8e74..41e1d71 100644 --- a/README.md +++ b/README.md @@ -19,3 +19,52 @@ Endpoint: https://s3.example.com/ KeyId: abc SecretKey: 123supersecret ``` + +### softdrain + +Drain a Kubernetes node by first scaling each deployment to n+1 to avoid downtime for single-pod deployments. + +``` +% softdrain mynode +Soft move app-namespace / backend? [y/n/c] +``` + +### dupvc + +Run `du -s` in all PVCs in the cluster. + +``` +% dupvc -h +badm web-static 42M /app/webcontent +``` + +## Shorthand commands + +``` +alias docker-nimbus='export DOCKER_HOST=ssh://nimbus' + +alias kubectl-ns='kubectl config set-context --current --namespace' +alias kubectl-default='kubectl-ns default' + +alias kubectl-stratus='kubectl config use-context admin@stratus && kubectl-default' +alias kubectl-nimbus='kubectl config use-context admin@nimbus && kubectl-default' + +alias k='kubectl' +alias kd='kubectl describe' +alias ke='kubectl edit' +alias kg='kubectl get' +alias wkg='watch kubectl get' +alias wkt='watch kubectl top' +alias k-='kubectl delete' +alias ky='kubectl get -o yaml' +alias kl='kubectl logs -f' +alias kx='kubectl exec -it' +alias ka='kubectl apply -f' +alias kn='kubectl-ns' +alias kp='kubectl port-forward' + +alias ceph='kubectl rook-ceph ceph' + +alias s3='aws s3 --endpoint-url=$AWS_ENDPOINT_URL ' +alias s3api='aws s3api --endpoint-url=$AWS_ENDPOINT_URL ' +``` \ No newline at end of file -- GitLab