Skip to content

Instantly share code, notes, and snippets.

cp ~/.kube/config ~/.kube/config.bak
KUBECONFIG=~/.kube/config.1:~/.kube/config.2 kubectl config view --flatten > ~/.kube/config_tmp
mv ~/.kube/config_tmp ~/.kube/config
@thomanhphuc
thomanhphuc / gist:cbf907e5e99f074eaaee15727556ff2d
Created December 27, 2023 07:50
minio kube proxy login error
https://github.com/minio/console/issues/2539#issuecomment-1619211962
@thomanhphuc
thomanhphuc / gist:b39eeebf915c6490401abf90a3ff2799
Created August 30, 2023 08:33
Remove Namespace stuck in terminating state after delete
kubectl get namespace keda -o json >tmp.json
edit tmp.json
"spec": {
"finalizers": [
]
},
kubectl proxy
curl -k -H "Content-Type: application/json" -X PUT --data-binary @tmp.json http://127.0.0.1:8001/api/v1/namespaces/keda/finalize
kubectl delete apiservice v1beta1.external.metrics.k8s.io
#EXTM3U url-tvg="http://stream.cvmtv.site:5000/epg.xml,http://trada.info/epg.xml,http://stream.cvmtv.site:9981/xmltv/channels"
#EXTINF:-1 group-title="VIỆT NAM" tvg-id="quochoi" tvg-logo="https://quochoitv.vn/themes/quochoitv/images/logo-qhtv-new.png",Quốc Hội TV
http://stream.cvmtv.site/qhtv?token=live
@thomanhphuc
thomanhphuc / gist:7261d2ba4adc773b0cfb099c4b796eb2
Last active August 9, 2023 08:29
Vim copy/paste messing up indentaton

~/.vimrc

" Code from:
" http://stackoverflow.com/questions/5585129/pasting-code-into-terminal-window-into-vim-on-mac-os-x
" then https://coderwall.com/p/if9mda
" and then https://github.com/aaronjensen/vimfiles/blob/59a7019b1f2d08c70c28a41ef4e2612470ea0549/plugin/terminaltweaks.vim
" to fix the escape time problem with insert mode.
"
" Docs on bracketed paste mode: