I hereby claim:
- I am microwaves on github.
- I am szfs (https://keybase.io/szfs) on keybase.
- I have a public key ASAJex2jmtsD-uxoDKhXWe0ukKV_Q9J7CwKSO__rOSHjbwo
To claim this, I am signing this object:
ps -axfo pid,uname,cmd |
# Find ghost deleted files from processes | |
find /proc/*/fd -ls | grep '(deleted)' | |
# Truncate | |
: > "/proc/$pid/fd/$fd" |
# Remove files older than 5 days | |
find /path/to/files* -mtime +5 -exec rm {} \; |
#You can simulate a rerun by replacing the job with itself: | |
kubectl get job "your-job" -o json | kubectl replace --force -f - | |
#If you get errors due to auto-generated labels or selectors, you can delete or edit them with jq: | |
kubectl get job "your-job" -o json | jq 'del(.spec.selector)' | jq 'del(.spec.template.metadata.labels)' | kubectl replace --force -f - |
# In the Master's shell execute: | |
curl -k -H "Content-Type: application/json" -XPUT --cacert /srv/kubernetes/ca.crt -H "Authorization: Bearer <token>" --data-binary @ns.json https://localhost/api/v1/namespaces/namespace-name/finalize | |
# The bearer token can be found in the file below, under 'admin': | |
sudo cat /srv/kubernetes/known_tokens.csv | |
# Content for ns.json: | |
{ | |
"kind": "Namespace", | |
"apiVersion": "v1", |
amtool --alertmanager.url http://localhost:9093 -o extended alert |
kubectl get pods -a --all-namespaces -o json | jq '.items[] | select(.status.reason!=null) | select(.status.reason | contains("Evicted")) | "kubectl delete pods \(.metadata.name) -n \(.metadata.namespace)"' | xargs -n 1 bash -c |
# fly login | |
function flo() { | |
fly login -t $1 -n $2 -c $3 -u $4 -p $5 -k | |
} | |
# fly get-pipeline | |
function fgp() { | |
fly -t $1 get-pipeline -p $2 | |
} |
I hereby claim:
To claim this, I am signing this object:
# To create a k8s configuration description out of whatever command you issue to kubectl, without executing the operation. | |
kubectl create service externalname --external-name=foo foo -o yaml --dry-run |