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