diff --git a/.gitignore b/.gitignore index c18dd8d83ceed1806b50b0aaa46beb7e335fff13..cafd59837cd04aacbb6f368a8cc55edbec63878d 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 62c8e74b0d8914440c2b032ceb1ae860094e4e03..41e1d7173c35ee180fd6353d110f40cecabe74d0 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