microk8s enable istio snap alias microk8s.kubectl mk mk create namespace bookinfo mk label namespace bookinfo istio-injection=enabled mk config set-context --current --namespace=bookinfo mk apply -f https://raw.githubusercontent.com/istio/istio/release-1.12/samples/bookinfo/platform/kube/bookinfo.yaml mk apply -f https://raw.githubusercontent.com/istio/istio/release-1.12/samples/bookinfo/networking/bookinfo-gateway.yaml mk apply -f https://raw.githubusercontent.com/istio/istio/release-1.12/samples/bookinfo/networking/destination-rule-all-mtls.yaml mk apply -f https://raw.githubusercontent.com/istio/istio/release-1.12/samples/bookinfo/networking/virtual-service-all-v1.yaml mk get virtualservices NAME GATEWAYS HOSTS AGE bookinfo ["bookinfo-gateway"] ["*"] 15m mk get gateway NAME AGE bookinfo-gateway 15m mk get pod -l app=ratings --show-labels NAME ... LABELS ratings-v1-xxx ... app=ratings,... mk exec "$(mk get pod -l app=ratings -o jsonpath='{.items[0].metadata.name}')" -c ratings -- curl -sS productpage:9080/productpage | grep -o "<title>.*</title>" <title>Simple Bookstore App</title> |
Tips
my shell configuration
Standardsh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k git clone https://github.com/pyenv/pyenv.git ~/.pyenv echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zprofile echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zprofile echo 'eval "$(pyenv init --path)"' >> ~/.zprofile echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.profile echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.profile echo 'eval "$(pyenv init --path)"' >> ~/.profile echo 'eval "$(pyenv init -)"' >> ~/.zshrc sed 's/\(^plugins=([^)]*\)/\1 zsh-autosuggestions zsh-syntax-highlighting pyenv z microk8s/' ~/.zshrc grep -v -e ^# -e ^$ ~/.zshrc if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" fi export ZSH="/home/ye/.oh-my-zsh" ZSH_THEME="powerlevel10k/powerlevel10k" plugins=(git zsh-autosuggestions zsh-syntax-highlighting pyenv z microk8s) source $ZSH/oh-my-zsh.sh alias kubectl="microk8s.kubectl" [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh eval "$(pyenv init -)" |
2021春節おめでとう
Standard支付宝上购买出行保亚洲畅行的实际理赔过程
StandardCreate a video thumbnail with ffmpeg
StandardParsing JSON data of the timeline from the SQLServer table column, and create thumbnail based on it with FFmpeg.
Quick and dirty scripts using Golang.
動画からサムネイル画像を取得して保存する
StandardJS:
Happy New Year 新年おめでとう
StandardCakePHP3ブログチュートリアル
StandardRaspberry Pi 3にDockerをインストールする
Standardcat /etc/issue Raspbian GNU/Linux 9 \n \l apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg2 \ software-properties-common curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add - cat /etc/apt/sources.list.d/docker.list deb [arch=armhf] https://download.docker.com/linux/debian stretch stable apt-get update apt-get install --yes docker-ce |