经过kubectl能够很方便的把istio部署到k8s里,固然使用helm也是能够的,但有时helm版本和istio会有冲突,因此本文主要使用kubectl来进行部署git
在Service Mesh中,咱们须要了解Data Plane和Control Plane两个概念:网络
curl -L https://git.io/getLatestIstio | sh -
kubectl create namespace istio-system
for i in install/kubernetes/helm/istio-init/files/crd*yaml; do kubectl apply -f $i; done
kubectl get crds | grep 'istio.io' | wc -l
kubectl apply -f install/kubernetes/istio-demo.yaml
这个过程须要消耗一些时间,它会先下载镜像,而后才能启动容器app
[root@i-pcwovafu istio-1.5.1]# kubectl -n istio-system get pods NAME READY STATUS RESTARTS AGE grafana-7797c87688-9nwd9 0/1 ContainerCreating 0 11m istio-citadel-f5974cc7d-tqglf 0/1 ContainerCreating 0 11m istio-egressgateway-5757854ddd-x6cq9 0/1 Running 0 11m istio-galley-6799449b85-tnlpm 1/1 Running 0 11m istio-grafana-post-install-1.5.1-h7ph2 0/1 Completed 0 11m istio-ingressgateway-7dcf45496f-2cwcm 0/1 Running 0 11m istio-pilot-7897f5dc-j9jzr 0/2 ContainerCreating 0 11m istio-policy-5b579b8889-gs4j9 0/2 ContainerCreating 0 11m istio-security-post-install-1.5.1-xlx2n 0/1 Completed 0 11m istio-sidecar-injector-5d97f8cb99-rh22f 0/1 ContainerCreating 0 11m istio-telemetry-d79f68d7d-cnpn2 0/2 ContainerCreating 0 11m istio-tracing-797d4c8d48-fmrlh 1/1 Running 0 11m kiali-74fdc898b9-d5w5z 0/1 ImagePullBackOff 0 11m prometheus-c8fdbd64f-fh7vs 0/1 ContainerCreating 0 11m
须要等待这些pod启动以后,你的istio才算启动起来。负载均衡
# kubectl label namespace default istio-injection=enable
# kubectl label namespace default istio-injection-
kubectl get namespace -L istio-injection
今天主要先介绍到这边,下次再讲一下具体的istio的组件的使用。curl