Kubernetes 相當好用,但是要維運的時候最痛苦的事情,就是要打 kubectl
雖然我超愛 Golang ,而且其實我基本的 IDE 都是使用 VSCode ,但是我一定要跟各位好好推薦這個好工具. Vikube.vim
不論你透過 alias 設定成 kc 甚至是 k 還是得要記憶一堆指令 ex: kubectl get pod
其實就算你不是 vim 的愛用者 (畢竟學習曲線太高了) 我還是很推薦你使用這個工具.
:VikubeContextList 可以開啟你所有連接過的 K8S 集群,透過 s 來切換你的集群.
:VikubeNodeList 可以開啟所有的節點清單,l 可以看到 結點上面的 logs, 可以幫助你除錯(如果有問題)
:VikubePodList 可以開啟 pod 清單,當然也可以透過 l 來看 POD 是否有出現問題.
:VikubeTop 可以開啟 top 來看各個 POD 的使用量
真的很好用… 再也不用擔心打 kubectl 或是忘記相關指令了 :p
起源
Fish Shell 強大的親和力,並且讓我很簡單就上手.讓我使用上相當方便. 但是隨著許多軟體的安裝都還是需要 bash 並且在 vim 的更新上變得相當困難. 我其實有開始想要把 fish 換到大家比較常使用的 zsh .
原本看了這篇文章 超簡單!十分鐘打造漂亮又好用的 zsh command line 環境 要打算把自己的 fish shell 換到 zsh.
不過考量許多原因,做了一些小修改:
Fish shell failure update Vundle in Vim:
Refer: I don’t use a POSIX Shell (i.e. Bash/Sh)](https://github.com/VundleVim/Vundle.vim/wiki#i-dont-use-a-posix-shell-ie-bashsh)
解法: add ~/.config/fish/functions/updatevim.fish
function updatevim
set -lx SHELL (which sh)
vim +BundleInstall! +BundleClean +qall
end
Zsh PowerLevel9k 看起來實在很威
PowerLevel9K 實在很方便,所以找了一個 Fish Shell 可以使用的 bobthefish
不過 bobthefish 資訊太多了,需要一些調整.
#OMF setting for bobthefish
#
set -g theme_display_date no
set -g theme_nerd_fonts yes
set -g theme_display_k8s_context no
換漂亮的字型 nerd-font
後來有換這個字型,看起來還挺順眼的.
還有..
VSCode Integrated terminal 還是會有亂碼,目前還在解決中. 可以參考這個VSCode integrated terminal versus nerdfont-complete #672
Reference
https://github.com/oh-my-fish/oh-my-fish/blob/master/docs/Themes.md#bobthefish
超簡單!十分鐘打造漂亮又好用的 zsh command line 環境
VSCode integrated terminal versus nerdfont-complete #672
Powerline fonts in terminal incorrect #7116
Preface As a cloud company, we usually build our container cluster on cloud platforms such as GCP or AWS. but sometimes we need to think about how to take to go solution to our customer. So, here comes a challenge - Scale-in our cloud platform and put into pocket (mmm I mean “minikube”) An example GKE service Here is a simple example which you (might) build in GKE. DB: MongoDB with stateful set binding with google persistent disk. Use stateful set from (“Running MongoDB on Kubernetes with StatefulSets”) as an example Web service(fooBar): a golang application which accesses mongo DB with the load balancer. Because fooBar is proprietary application which fooBar image store in GCR (Google Cloud Registry) not in docker hub. How to migrate your service from GKE to minikube: We will just list some note to let you know any tip or note you migrate your service to...