run bookinfo with microk8s istio

Standard
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>

my shell configuration

Standard
sh -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 -)"

支付宝上购买出行保亚洲畅行的实际理赔过程

Standard

2019年底父母来我们这玩,赶巧不巧的因为疫情关系航班一次次的取消,一晃就在这边生活了一年。
考虑到父母在这边万一有个什么,所以从出发那天起就每月在支付宝上面为两老购买一份【出行保亚洲畅行】的保险。
买的时候主要是防意外,也没注意到上面还附有航班取消延误险。
当3月份各航班开始被大范围取消时我有意无意点开仔细看了下保险条款。 [read more]

Raspberry Pi 3にDockerをインストールする

Standard
cat /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