资源要求

  1. 内存 12 GB(全套安装推荐 16GB 资源,可安装部分组件体验)
  2. CPU 6 核心
  3. Kube 集群

安装 Helm

安装 3.x 的 beta 版本

1
2
3
wget https://get.helm.sh/helm-v3.0.0-beta.3-linux-amd64.tar.gz
tar -xvf helm-v3.0.0-beta.3-linux-amd64.tar.gz
cp linux-amd64/helm /usr/local/bin/

安装 Istio

安装 istio 步骤

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Download and unpack Istio
export ISTIO_VERSION=1.2.6
curl -L https://git.io/getLatestIstio | sh -
cd istio-${ISTIO_VERSION}


for i in install/kubernetes/helm/istio-init/files/crd*yaml; do kubectl apply -f $i; done

cat <<EOF | kubectl apply -f -
   apiVersion: v1
   kind: Namespace
   metadata:
     name: istio-system
     labels:
       istio-injection: disabled
EOF


# A lighter template, with just pilot/gateway.
# Based on install/kubernetes/helm/istio/values-istio-minimal.yaml
helm template --namespace=istio-system \
  --set prometheus.enabled=false \
  --set mixer.enabled=false \
  --set mixer.policy.enabled=false \
  --set mixer.telemetry.enabled=false \
  `# Pilot doesn't need a sidecar.` \
  --set pilot.sidecar=false \
  --set pilot.resources.requests.memory=128Mi \
  `# Disable galley (and things requiring galley).` \
  --set galley.enabled=false \
  --set global.useMCP=false \
  `# Disable security / policy.` \
  --set security.enabled=false \
  --set global.disablePolicyChecks=true \
  `# Disable sidecar injection.` \
  --set sidecarInjectorWebhook.enabled=false \
  --set global.proxy.autoInject=disabled \
  --set global.omitSidecarInjectorConfigMap=true \
  `# Set gateway pods to 1 to sidestep eventual consistency / readiness problems.` \
  --set gateways.istio-ingressgateway.autoscaleMin=1 \
  --set gateways.istio-ingressgateway.autoscaleMax=1 \
  `# Set pilot trace sampling to 100%` \
  --set pilot.traceSampling=100 \
  install/kubernetes/helm/istio \
  > ./istio-lean.yaml

kubectl apply -f istio-lean.yaml

验证 istio 安装

1
2
3
4
[root@master istio-1.2.6]# kubectl get pods --namespace istio-system
NAME                                    READY   STATUS    RESTARTS   AGE
istio-ingressgateway-84d88ff4d6-drxt6   1/1     Running   0          2m49s
istio-pilot-5979d695f7-lv9bb            1/1     Running   0          2m49s

安装 knative

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# 安装一次
kubectl apply --selector knative.dev/crd-install=true \
    --filename https://github.com/knative/serving/releases/download/v0.9.0/serving.yaml \
    --filename https://github.com/knative/eventing/releases/download/v0.9.0/release.yaml \
    --filename https://github.com/knative/serving/releases/download/v0.9.0/monitoring.yaml

# 再来一遍
kubectl apply \
    --filename https://github.com/knative/serving/releases/download/v0.9.0/serving.yaml \
    --filename https://github.com/knative/eventing/releases/download/v0.9.0/release.yaml \
    --filename https://github.com/knative/serving/releases/download/v0.9.0/monitoring.yaml

验证安装

1
2
3
kubectl get pods --namespace knative-serving
kubectl get pods --namespace knative-eventing
kubectl get pods --namespace knative-monitoring