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