forked from kserve/kserve
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquick_install.sh
executable file
·86 lines (77 loc) · 2.42 KB
/
quick_install.sh
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
set -e
export ISTIO_VERSION=1.6.2
export KNATIVE_VERSION=v0.18.0
export KFSERVING_VERSION=v0.5.0
curl -L https://git.io/getLatestIstio | sh -
cd istio-${ISTIO_VERSION}
# Create istio-system namespace
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Namespace
metadata:
name: istio-system
labels:
istio-injection: disabled
EOF
cat << EOF > ./istio-minimal-operator.yaml
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
spec:
values:
global:
proxy:
autoInject: disabled
useMCP: false
# The third-party-jwt is not enabled on all k8s.
# See: https://istio.io/docs/ops/best-practices/security/#configure-third-party-service-account-tokens
jwtPolicy: first-party-jwt
addonComponents:
pilot:
enabled: true
tracing:
enabled: true
kiali:
enabled: true
prometheus:
enabled: true
grafana:
enabled: true
components:
ingressGateways:
- name: istio-ingressgateway
enabled: true
- name: cluster-local-gateway
enabled: true
label:
istio: cluster-local-gateway
app: cluster-local-gateway
k8s:
service:
type: ClusterIP
ports:
- port: 15020
name: status-port
- port: 80
name: http2
- port: 443
name: https
EOF
bin/istioctl manifest apply -f istio-minimal-operator.yaml
# Install Knative
kubectl apply --filename https://github.com/knative/serving/releases/download/${KNATIVE_VERSION}/serving-crds.yaml
kubectl apply --filename https://github.com/knative/serving/releases/download/${KNATIVE_VERSION}/serving-core.yaml
kubectl apply --filename https://github.com/knative/net-istio/releases/download/${KNATIVE_VERSION}/release.yaml
# Install Cert Manager
kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v0.15.1/cert-manager.yaml
kubectl wait --for=condition=available --timeout=600s deployment/cert-manager-webhook -n cert-manager
cd ..
# Install KFServing
K8S_MINOR=$(kubectl version | perl -ne 'print $1."\n" if /Server Version:.*?Minor:"(\d+)"/')
if [[ $K8S_MINOR -lt 16 ]]; then
kubectl apply -f install/${KFSERVING_VERSION}/kfserving_crds.yaml --validate=false
else
kubectl apply -f install/${KFSERVING_VERSION}/kfserving_crds.yaml
fi
kubectl apply -f install/${KFSERVING_VERSION}/kfserving.yaml
# Clean up
rm -rf istio-${ISTIO_VERSION}