kubernetes部署istio

kubernetes部署istio

版本下载:https://istio.io/docs/setup/#downloading-the-release

安装参考:https://istio.io/docs/setup/install/helm/

安装要求:所有节点建议2C4G,否则可能导致pod pending无法调度。

istio有多种安装方式

  • kubetctl apply方式,仅用于评估测试,生产环境官方建议用helm
  • helm template方式安装,无需tiller
  • helm install方式安装,需要tiller

安装要求:所有节点建议2C4G,否则可能导致pod pending无法调度。

kubernetes集群信息

[root@kmaster ~]# kubectl get nodes -o wide
NAME                   STATUS   ROLES    AGE     VERSION   INTERNAL-IP    EXTERNAL-IP   OS-IMAGE                KERNEL-VERSION               CONTAINER-RUNTIME
kmaster.example.com    Ready    master   3h49m   v1.16.2   172.16.10.10   <none>        CentOS Linux 7 (Core)   3.10.0-957.27.2.el7.x86_64   docker://19.3.4
kworker1.example.com   Ready    <none>   3h46m   v1.16.2   172.16.10.11   <none>        CentOS Linux 7 (Core)   3.10.0-957.27.2.el7.x86_64   docker://19.3.4
kworker2.example.com   Ready    <none>   3h42m   v1.16.2   172.16.10.12   <none>        CentOS Linux 7 (Core)   3.10.0-957.27.2.el7.x86_64   docker://19.3.4

下载并安装istio,本次使用helm install方式进行安装

# 下载软件包并解压
curl -L https://git.io/getLatestIstio | ISTIO_VERSION=1.3.3 sh -

cd istio-1.3.3/
cp bin/istioctl /usr/local/bin/

#确认安装环境满足要求
istioctl verify-install

# 安装所有Istio CRD
helm install install/kubernetes/helm/istio-init --name istio-init --namespace istio-system

#查看创建的资源
[root@kmaster ~]# kubectl -n istio-system get pods
NAME                            READY   STATUS      RESTARTS   AGE
istio-init-crd-10-1.3.3-7jzbf   0/1     Completed   0          4m46s
istio-init-crd-11-1.3.3-2pzlr   0/1     Completed   0          4m46s
istio-init-crd-12-1.3.3-6gk9k   0/1     Completed   0          4m46s

#查看创建的crd,必须为23个
kubectl get crds | grep 'istio.io' | wc -l
23

部署 Istio 的核心组件

# 根据实际情况配置更新 values.yaml(默认即可)
cat install/kubernetes/helm/istio/values.yaml

helm  install install/kubernetes/helm/istio --name istio --namespace istio-system

查看创建的资源

[root@kmaster ~]# kubectl -n istio-system get pods
NAME                                      READY   STATUS      RESTARTS   AGE
istio-citadel-67f6594c46-4rblv            1/1     Running     1          17m
istio-galley-6c7fcf86d4-24s59             1/1     Running     1          17m
istio-ingressgateway-6d68548679-gcp4l     1/1     Running     1          17m
istio-init-crd-10-1.3.3-7jzbf             0/1     Completed   0          23m
istio-init-crd-11-1.3.3-2pzlr             0/1     Completed   0          23m
istio-init-crd-12-1.3.3-6gk9k             0/1     Completed   0          23m
istio-pilot-789d4748b-r9blx               2/2     Running     0          17m
istio-policy-59d8f8c9f8-7zcps             2/2     Running     6          17m
istio-sidecar-injector-6d967869b5-pqwbc   1/1     Running     1          17m
istio-telemetry-646f74c6bf-9n7nr          2/2     Running     0          17m
prometheus-6f74d6f76d-4w5cc               1/1     Running     1          17m

你可能感兴趣的:(kubernetes)