安装
下载istio 1.1版本
[[email protected] ~]# wget https://github.com/istio/istio/releases/download/1.1.1/istio-1.1.1-linux.tar.gz……2019-03-26 09:39:06 (483 KB/s) - ‘istio-1.1.1-linux.tar.gz’ saved [15736205/15736205]
Istio安装有多种方式,本文根据helm template生成istio部署的配置文件,其他部署方式请参考官方文档。
[[email protected] ~]# cd istio-1.1.1/[[email protected] istio-1.1.1]# helm template ../install/kubernetes/helm/istio-init --name istio-init --namespace istio-system > istio-init.yaml[[email protected] istio-1.1.1]# kubectl get crds | grep ‘istio.io\|certmanager.k8s.io‘ | wc -l[[email protected] istio-1.1.1]# Internalip=10.20.1.175[[email protected] istio-1.1.1]# helm template install/kubernetes/helm/istio --namespace istio-system > --set global.mtls.enabled=true > --set global.controlPlanesecurityEnabled=true > --set gateways.istio-ingressgateway.type=NodePort > --set grafana.enabled=true > --set servicegraph.enabled=true > --set servicegraph.ingress.enabled=true > --set servicegraph.ingress.hosts={servicegraph-istio-system.${Internalip}.nip.io} > --set tracing.enabled=true > --set tracing.jaeger.ingress.enabled=true > --set tracing.jaeger.ingress.hosts={jaeger-query-istio-system.${Internalip}.nip.io} > --set tracing.ingress.enabled=true > --set tracing.ingress.hosts={tracing-istio-system.${Internalip}.nip.io} > --set kiali.enabled=true > --set kiali.ingress.enabled=true > --set kiali.ingress.hosts={kiali-istio-system.${Internalip}.nip.io} > --set kiali.dashboard.grafanaURL=http://grafana-istio-system.${Internalip}.nip.io > --set kiali.dashboard.jaegerURL=http://jaeger-query-istio-system.${Internalip}.nip.io > --name istio > ruffy/istio-${Internalip}.yaml[[email protected] istio-1.1.1]# cd ruffy[[email protected] ruffy]# lsistio-10.20.1.175.yaml istio-init.yaml namespace.yaml
根据配置模板部署Isito组件
[[email protected] istio-1.1.1]# kubectl apply -f ruffy/namespace.yamlnamespace/istio-system created [[email protected] istio-1.1.1]# kubectl apply -f ruffy/istio-init.yamlconfigmap/istio-crd-10 createdconfigmap/istio-crd-11 createdserviceaccount/istio-init-service-account createdclusterrole.rbac.authorization.k8s.io/istio-init-istio-system configuredclusterrolebinding.rbac.authorization.k8s.io/istio-init-admin-role-binding-istio-system configuredjob.batch/istio-init-crd-10 createdjob.batch/istio-init-crd-11 created[[email protected] istio-1.1.1]# kubectl apply -f ruffy/istio-10.20.1.175.yamlpoddisruptionbudget.policy/istio-galley createdpoddisruptionbudget.policy/istio-ingressgateway createdpoddisruptionbudget.policy/istio-policy createdpoddisruptionbudget.policy/istio-telemetry createdpoddisruptionbudget.policy/istio-pilot created……rule.config.istio.io/promhttp createdrule.config.istio.io/promtcp createdrule.config.istio.io/promtcpconnectionopen createdrule.config.istio.io/promtcpconnectionclosed createdhandler.config.istio.io/kubernetesenv createdrule.config.istio.io/kubeattrgenrulerule createdrule.config.istio.io/tcpkubeattrgenrulerule createdkubernetes.config.istio.io/attributes createddestinationrule.networking.istio.io/istio-policy createddestinationrule.networking.istio.io/istio-telemetry created
查看Isito部署状态
[[email protected] istio-1.1.1]# kubectl -n istio-system get allname READY STATUS RESTARTS AGEpod/grafana-7b46bf6b7c-xr2lw 1/1 Running 0 2mpod/istio-citadel-5878d994cc-kfm7p 1/1 Running 0 2mpod/istio-cleanup-secrets-1.1.1-wlk7p 0/1 Completed 0 2mpod/istio-galley-6db4964df6-9lpsl 1/1 Running 0 2mpod/istio-grafana-post-install-1.1.1-44lv7 0/1 Completed 0 2mpod/istio-ingressgateway-cd5df7bc6-sgh5m 0/1 Running 0 2mpod/istio-init-crd-10-q5kvp 0/1 Completed 0 3mpod/istio-init-crd-11-kdd25 0/1 Completed 0 3mpod/istio-pilot-597dd58685-hsp72 1/2 Running 0 2mpod/istio-policy-67f66c8b5c-8kqwm 2/2 Running 5 2mpod/istio-security-post-install-1.1.1-gcjrm 0/1 Completed 0 2mpod/istio-sIDecar-injector-59fc9d6f7d-j9prx 0/1 ContainerCreating 0 2mpod/istio-telemetry-c5bfc457f-qqzb5 2/2 Running 4 2mpod/istio-tracing-75dd89b8b4-2t2hl 0/1 ContainerCreating 0 2mpod/kiali-5d68f4c676-bdltq 1/1 Running 0 2mpod/prometheus-89bc5668c-7kp8b 0/1 Init:Error 1 2mpod/servicegraph-57bfbbd697-6tldj 0/1 Running 0 2m……name DESIRED SUCCESSFul AGEjob.batch/istio-cleanup-secrets-1.1.1 1 1 2mjob.batch/istio-grafana-post-install-1.1.1 1 1 2mjob.batch/istio-init-crd-10 1 1 3mjob.batch/istio-init-crd-11 1 1 3mjob.batch/istio-security-post-install-1.1.1 1 1 2m
增加grafana和prometheus的ingress文件
Istio-grafana.yaml
[[email protected] ruffy]# cat istio-grafana-ingress.yamlAPIVersion: extensions/v1beta1kind: IngressMetadata:name: grafananamespace: istio-systemlabels:app: grafanaannotations:spec:rules:host: granafa-istio.10.20.1.175.xip.io http: paths: path: / backend: servicename: grafana servicePort: 3000
Isito-prometheus-ingress.yaml[[email protected] ruffy]# cat istio-prometheus-ingress.yamlAPIVersion: extensions/v1beta1kind: IngressMetadata:name: istio-prometheusnamespace: istio-systemspec:rules:host: prometheus-istio.10.20.1.175.xip.io http: paths: path: /prometheus backend: servicename: prometheus servicePort: 9090}}}
查看部署的组件访问路径{{{[[email protected] ruffy]# kubectl -n istio-system get ingname HOSTS ADDRESS PORTS AGEgrafana granafa-istio.10.20.1.175.xip.io 80 5mistio-prometheus prometheus-istio.10.20.1.175.xip.io 80 5mistio-servicegraph servicegraph-istio-system.10.20.1.175.nip.io 80 56mistio-tracing tracing-istio-system.10.20.1.175.nip.io 80 56mkiali kiali-istio-system.10.20.1.175.nip.io 80 56m
访问kiali时,出现secret不存在的情况,需要通过kiali-secret.yaml文件创建secret,并且重启kiali服务。
Kiali-secret.yaml文件
[[email protected] ruffy]# cat kiali-secret.yamlAPIVersion: v1kind: SecretMetadata:name: kialinamespace: istio-systemlabels:app: kialitype: Opaquedata:username: "YWRtaW4="passphrase: "YWRtaW4="
访问Kiali
浏览器输入地址:http://kiali-istio-system.10.2 ... iali/
用户名/密码:admin/admin
访问servicegraph
浏览器输入地址:http://servicegraph-istio-syst ... .html
访问tracing
浏览器输入地址:http://servicegraph-istio-syst ... .html
访问granafa
浏览器输入地址:http://granafa-istio.10.20.1.1 ... d%3D1
至此 Istio1.1及其依赖组件搭建完毕。
总结以上是内存溢出为你收集整理的Istio 1.1部署实践全部内容,希望文章能够帮你解决Istio 1.1部署实践所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)