# 查询context kubectl config get-contexts # 设置context kubectl config use-context docker-desktop
istioctl install --set profile=demo -y
kubectl label namespace default istio-injection=enabled
shellkubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.17/samples/bookinfo/platform/kube/bookinfo.yaml
shellkubectl exec "$(kubectl get pod -l app=ratings -o jsonpath='{.items[0].metadata.name}')" -c ratings -- curl -sS productpage:9080/productpage | grep -o "<title>.*</title>"
kubectl get svc istio-ingressgateway -n istio-system NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE istio-ingressgateway LoadBalancer 10.96.163.194 localhost 15021:30278/TCP,80:31993/TCP,443:30544/TCP,31400:30466/TCP,15443:30305/TCP 7m35s
shellkubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.17/samples/bookinfo/networking/bookinfo-gateway.yaml
export INGRESS_HOST=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.status.loadBalancer.ingress[0].hostname}')
先在本地下载好istio的源码:https://github.com/istio/istio/tree/release-1.17/samples/addons
安装kiali和其他组件
kubectl apply -f samples/addons # 查询安装状态 kubectl rollout status deployment/kiali -n istio-system
访问kiali面板
istioctl dashboard kiali
本文作者:瓜儿爸
本文链接:
版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!