Istio 1.0.0 安装教程

本文为安装快速笔记,如有疑问可直接留言

安装Kubernetes

单机学习环境可参考本人的另一篇:
使用kubeadm安装k8s all-in-one单机测试环境

安装helm

[root@tp4dd src]# wget https://storage.googleapis.com/kubernetes-helm/helm-v2.9.1-linux-amd64.tar.gz
[root@tp4dd src]# tar zxvf helm-v2.9.1-linux-amd64.tar.gz
[root@tp4dd src]# cp linux-amd64/helm /usr/bin

配置tiller

# 拉取镜像(GFW)
docker pull dolphintwo/tiller:v2.9.1
docker tag dolphintwo/tiller:v2.9.1 gcr.io/kubernetes-helm/tiller:v2.9.1
docker rmi dolphintwo/tiller:v2.9.1

# 下载istio
[root@tp4dd src]# curl -L https://git.io/getLatestIstio | sh -
[root@tp4dd src]# cd istio-1.0.0
# 为 Tiller 配置 service account
[root@tp4dd istio-1.0.0]# kubectl create -f install/kubernetes/helm/helm-service-account.yaml
# 使用 service account 在您的集群中安装 Tiller
[root@tp4dd istio-1.0.0]# helm init --service-account tiller # 如果已安装更新加 –upgrade 参数
[root@tp4dd istio-1.0.0]# helm list #没任何返回表示成功
# helm 2.10.0以前的版本需要装一下CRD
[root@tp4dd istio-1.0.0]# kubectl apply -f install/kubernetes/helm/istio/templates/crds.yaml
[root@tp4dd istio-1.0.0]# kubectl apply -f install/kubernetes/helm/istio/charts/certmanager/templates/crds.yaml

安装istio

[root@tp4dd istio-1.0.0]# helm install install/kubernetes/helm/istio --name istio --namespace istio-system --set gateways.istio-ingressgateway.type=NodePort --set gateways.istio-egressgateway.type=NodePort
NAME: istio
LAST DEPLOYED: Fri Aug 3 15:02:30 2018
NAMESPACE: istio-system
STATUS: DEPLOYED
RESOURCES:
==> v1beta1/ClusterRole
NAME AGE
istio-galley-istio-system 6s
istio-ingressgateway-istio-system 6s
istio-egressgateway-istio-system 6s
istio-mixer-istio-system 6s
istio-pilot-istio-system 6s
prometheus-istio-system 6s
istio-citadel-istio-system 6s
istio-sidecar-injector-istio-system 6s
==> v1alpha3/Gateway
istio-autogenerated-k8s-ingress 4s
==> v1alpha2/kubernetesenv
handler 3s
==> v1alpha2/logentry
tcpaccesslog 3s
accesslog 3s
==> v1alpha2/metric
responsesize 3s
requestsize 3s
tcpbytereceived 3s
requestcount 2s
tcpbytesent 2s
requestduration 2s
==> v1alpha2/stdio
handler 2s
==> v1/Pod(related)
NAME READY STATUS RESTARTS AGE
istio-galley-5669f7c9b-2dp69 0/1 ContainerCreating 0 4s
istio-ingressgateway-5475685bbb-cx8dc 0/1 Pending 0 4s
istio-egressgateway-676c8546c5-652xv 0/1 ContainerCreating 0 4s
istio-policy-7f945bf487-dj7mt 0/2 Pending 0 4s
istio-telemetry-6c587bdbc4-drmrt 0/2 Pending 0 4s
istio-statsd-prom-bridge-549d687fd9-tw4mc 0/1 Pending 0 4s
istio-pilot-5795d6d695-nqzr4 0/2 Pending 0 4s
prometheus-6ffc56584f-lk4t9 0/1 Pending 0 4s
istio-citadel-7d8f9748c5-xpcwv 0/1 Pending 0 4s
istio-sidecar-injector-d96cd9459-6j6fr 0/1 Pending 0 4s
==> v1/ConfigMap
NAME DATA AGE
istio-galley-configuration 1 6s
istio-statsd-prom-bridge 1 6s
prometheus 1 6s
istio-security-custom-resources 2 6s
istio 1 6s
istio-sidecar-injector 1 6s
==> v1beta1/MutatingWebhookConfiguration
NAME AGE
istio-sidecar-injector 3s
==> v1alpha2/kubernetes
attributes 3s
==> v1/ServiceAccount
NAME SECRETS AGE
istio-galley-service-account 1 6s
istio-ingressgateway-service-account 1 6s
istio-egressgateway-service-account 1 6s
istio-mixer-service-account 1 6s
istio-pilot-service-account 1 6s
prometheus 1 6s
istio-citadel-service-account 1 6s
istio-sidecar-injector-service-account 1 6s
==> v1beta1/ClusterRoleBinding
NAME AGE
istio-galley-admin-role-binding-istio-system 6s
istio-ingressgateway-istio-system 6s
istio-egressgateway-istio-system 6s
istio-mixer-admin-role-binding-istio-system 6s
istio-pilot-istio-system 6s
prometheus-istio-system 6s
istio-citadel-istio-system 6s
istio-sidecar-injector-admin-role-binding-istio-system 6s
==> v1/Service
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
istio-galley ClusterIP 10.98.175.234 <none> 443/TCP,9093/TCP 6s
istio-ingressgateway NodePort 10.105.161.144 <none> 80:31380/TCP,443:31390/TCP,31400:31400/TCP,15011:31804/TCP,8060:32606/TCP,15030:32107/TCP,15031:30235/TCP 5s
istio-egressgateway NodePort 10.100.33.205 <none> 80:30401/TCP,443:32381/TCP 5s
istio-telemetry ClusterIP 10.103.200.10 <none> 9091/TCP,15004/TCP,9093/TCP,42422/TCP 5s
istio-policy ClusterIP 10.106.3.33 <none> 9091/TCP,15004/TCP,9093/TCP 5s
istio-statsd-prom-bridge ClusterIP 10.98.232.242 <none> 9102/TCP,9125/UDP 5s
istio-pilot ClusterIP 10.98.169.13 <none> 15010/TCP,15011/TCP,8080/TCP,9093/TCP 5s
prometheus ClusterIP 10.100.185.216 <none> 9090/TCP 5s
istio-citadel ClusterIP 10.104.136.105 <none> 8060/TCP,9093/TCP 5s
istio-sidecar-injector ClusterIP 10.103.146.108 <none> 443/TCP 5s
==> v1alpha3/DestinationRule
NAME AGE
istio-telemetry 4s
istio-policy 4s
==> v1beta1/Deployment
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
istio-galley 1 1 1 0 5s
istio-ingressgateway 1 1 1 0 5s
istio-egressgateway 1 1 1 0 5s
istio-policy 1 1 1 0 5s
istio-telemetry 1 1 1 0 4s
istio-statsd-prom-bridge 1 1 1 0 4s
istio-pilot 1 1 1 0 4s
prometheus 1 1 1 0 4s
istio-citadel 1 1 1 0 4s
istio-sidecar-injector 1 1 1 0 4s
==> v2beta1/HorizontalPodAutoscaler
NAME REFERENCE TARGETS MINPODS MAXPODS REPLICAS AGE
istio-egressgateway Deployment/istio-egressgateway <unknown>/60% 1 5 0 4s
istio-ingressgateway Deployment/istio-ingressgateway <unknown>/60% 1 5 0 4s
istio-policy Deployment/istio-policy <unknown>/80% 1 5 0 4s
istio-telemetry Deployment/istio-telemetry <unknown>/80% 1 5 0 4s
istio-pilot Deployment/istio-pilot <unknown>/55% 1 1 0 3s
==> v1alpha2/attributemanifest
NAME AGE
istioproxy 3s
kubernetes 3s
==> v1alpha2/prometheus
handler 2s
==> v1alpha2/rule
promtcp 2s
stdiotcp 2s
kubeattrgenrulerule 2s
tcpkubeattrgenrulerule 2s
stdio 2s
promhttp 2s

# 安装成功
[root@tp4dd istio-1.0.0]# kubectl get pod -n istio-system
NAME                                        READY    STATUS    RESTARTS  AGE
istio-citadel-7d8f9748c5-xpcwv              1/1      Running  0          2m
istio-egressgateway-676c8546c5-652xv        1/1      Running  0          2m
istio-galley-5669f7c9b-2dp69                1/1      Running  0          2m
istio-ingressgateway-5475685bbb-cx8dc      1/1      Running  0          2m
istio-pilot-5795d6d695-nqzr4                2/2      Running  0          2m
istio-policy-7f945bf487-dj7mt              2/2      Running  0          2m
istio-sidecar-injector-d96cd9459-6j6fr      1/1      Running  0          2m
istio-statsd-prom-bridge-549d687fd9-tw4mc  1/1      Running  0          2m
istio-telemetry-6c587bdbc4-drmrt            2/2      Running  0          2m
prometheus-6ffc56584f-lk4t9                1/1      Running  0          2m

[root@tp4dd istio-1.0.0]# kubectl get svc -n istio-system
NAME                      TYPE        CLUSTER-IP      EXTERNAL-IP  PORT(S)                                                                                                    AGE
istio-citadel              ClusterIP  10.104.136.105  <none>        8060/TCP,9093/TCP                                                                                          2m
istio-egressgateway        NodePort    10.100.33.205    <none>        80:30401/TCP,443:32381/TCP                                                                                  2m
istio-galley              ClusterIP  10.98.175.234    <none>        443/TCP,9093/TCP                                                                                            2m
istio-ingressgateway      NodePort    10.105.161.144  <none>        80:31380/TCP,443:31390/TCP,31400:31400/TCP,15011:31804/TCP,8060:32606/TCP,15030:32107/TCP,15031:30235/TCP  2m
istio-pilot                ClusterIP  10.98.169.13    <none>        15010/TCP,15011/TCP,8080/TCP,9093/TCP                                                                      2m
istio-policy              ClusterIP  10.106.3.33      <none>        9091/TCP,15004/TCP,9093/TCP                                                                                2m
istio-sidecar-injector    ClusterIP  10.103.146.108  <none>        443/TCP                                                                                                    2m
istio-statsd-prom-bridge  ClusterIP  10.98.232.242    <none>        9102/TCP,9125/UDP                                                                                          2m
istio-telemetry            ClusterIP  10.103.200.10    <none>        9091/TCP,15004/TCP,9093/TCP,42422/TCP                                                                      2m
prometheus                ClusterIP  10.100.185.216  <none>        9090/TCP

清理

# 安装出错使用一下命令清理
helm delete --purge istio
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值