部署 Istio 

wget https://github.com/istio/istio/releases/download/1.4.2/istio-1.4.2-linux.tar.gz 
[root@k8s-master1 istio]# tar -xf istio-1.4.2-linux.tar.gz 
cd istio-1.4.2 
mv bin/istioctl /usr/bin 
istioctl manifest apply --set profile=demo 
kubectl get pods -n istio-system 
kubectl get svc -n istio-system

 卸载

istioctl manifest generate --set profile=demo | kubectl delete -f 

 查看

[root@k8s-master1 istio-1.4.2]# kubectl get svc  -n istio-system 
NAME                     TYPE           CLUSTER-IP   EXTERNAL-IP   PORT(S)                                                                                                                      AGE
grafana                  ClusterIP      10.0.0.43    <none>        3000/TCP                                                                                                                     56m
istio-citadel            ClusterIP      10.0.0.49    <none>        8060/TCP,15014/TCP                                                                                                           56m
istio-egressgateway      ClusterIP      10.0.0.238   <none>        80/TCP,443/TCP,15443/TCP                                                                                                     56m
istio-galley             ClusterIP      10.0.0.251   <none>        443/TCP,15014/TCP,9901/TCP,15019/TCP                                                                                         56m
istio-ingressgateway     LoadBalancer   10.0.0.104   <pending>     15020:30867/TCP,80:30447/TCP,443:30673/TCP,15029:30263/TCP,15030:31720/TCP,15031:31156/TCP,15032:32531/TCP,15443:32268/TCP   56m
istio-pilot              ClusterIP      10.0.0.215   <none>        15010/TCP,15011/TCP,8080/TCP,15014/TCP                                                                                       56m
istio-policy             ClusterIP      10.0.0.147   <none>        9091/TCP,15004/TCP,15014/TCP                                                                                                 56m
istio-sidecar-injector   ClusterIP      10.0.0.157   <none>        443/TCP                                                                                                                      56m
istio-telemetry          ClusterIP      10.0.0.97    <none>        9091/TCP,15004/TCP,15014/TCP,42422/TCP                                                                                       56m
jaeger-agent             ClusterIP      None         <none>        5775/UDP,6831/UDP,6832/UDP                                                                                                   56m
jaeger-collector         ClusterIP      10.0.0.175   <none>        14267/TCP,14268/TCP,14250/TCP                                                                                                56m
jaeger-query             ClusterIP      10.0.0.132   <none>        16686/TCP                                                                                                                    56m
kiali                    ClusterIP      10.0.0.21    <none>        20001/TCP                                                                                                                    56m
prometheus               ClusterIP      10.0.0.14    <none>        9090/TCP                                                                                                                     56m
tracing                  ClusterIP      10.0.0.217   <none>        80/TCP                                                                                                                       56m
zipkin                   ClusterIP      10.0.0.68    <none>        9411/TCP                                                          

服务使用 LoadBalancer 类型一般是在第三方云厂商支持下才有用。如果你是在自己搭建的 k8s 集群环境下一般使用 NodePort 类型。执行如下语句修改:

kubectl patch svc -n istio-system istio-ingressgateway -p '{"spec": {"type": "NodePort"}}'
[root@k8s-master1 istio-1.4.2]# kubectl get pod -n istio-system
NAME                                      READY   STATUS    RESTARTS   AGE
grafana-6b65874977-sfkw8                  1/1     Running   0          59m
istio-citadel-86dcf4c6b-nblkb             1/1     Running   0          59m
istio-egressgateway-68f754ccdd-5cfsg      1/1     Running   0          59m
istio-galley-5fc6d6c45b-cqz9x             1/1     Running   0          59m
istio-ingressgateway-6d759478d8-tqf4c     1/1     Running   0          59m
istio-pilot-5c4995d687-rxlhs              1/1     Running   0          59m
istio-policy-57b99968f-pj262              1/1     Running   3          59m
istio-sidecar-injector-746f7c7bbb-d9t5b   1/1     Running   0          59m
istio-telemetry-854d8556d5-v5gxr          1/1     Running   1          59m
istio-tracing-c66d67cd9-zvsmb             1/1     Running   0          59m
kiali-8559969566-rb5ql                    1/1     Running   0          59m
prometheus-66c5887c86-8p4hg               1/1     Running   0          59m

 

Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐