Istio
1. Installation
1.1 Delete existing Istio
이거 하는 이유는 Kubeflow설치하고 버젼이 낮아서 올리는데 목적이 있습니다.
서비스를 하지 않는 상태에서 진행할때 쓸수 있습니다.
경고. 아래의 코드는 istio-system을 날립니다. 반드시 서비스 중이 아닌 경우에만 실행합니다.
$ kubectl get namespaces istio-system -o json | jq '.spec.finalizers'=null | kubectl apply -f -
$ kubectl delete namespace istio-system
만약 freeze 현상이 일어난다면 (삭제되지 않고 계속 Terminating만 뜨는 상태)..
이 경우 json으로 다운 받은 다음에 finalizer 삭제해주고 replace 해주면 됨
$ kubectl get namespace istio-system -o json > istio-system.json
$ vi istio-system.json
spec.finalizers
안에 있는 kubernetes 또는 다른 내용들을 삭제 합니다.
/api/v1/namespaces/istio-system
를 알아낸다음에 /finalize
를 더 붙여서 주소를 만들어내고 replace 합니다.
$ kubectl get namespace istio-system -o json | jq .metadata.selfLink
"/api/v1/namespaces/knative-serving"
$ kubectl replace --raw "/api/v1/namespaces/istio-system/finalize" -f ./istio-system.json
1.2 Install Istio on Cloud
Istio를 다운로드 받고, istioctl을 설치합니다.
# 최신 버젼
$ curl -L https://istio.io/downloadIstio | sh -
# 특정 버젼
$ curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.6.8 sh -
# 설치
$ cd istio-*
$ sudo cp bin/istioctl /usr/local/bin/istioctl
# 버젼 확인
$ istioctl version --remote
client version: 1.7.3
control plane version: root@07253e1c-4f13-11ea-97de-0e8f370df5e1-docker.io/istio-release-1.3-<생략>
클라우드에 있는 Kubernetes 클러스터에 Istio를 설치합니다.
$ istioctl install
This will install the default Istio profile into the cluster. Proceed? (y/N) y
✔ Istio core installed
✔ Istiod installed
✔ Ingress gateways installed
✔ Installation complete
Istio를 적용하기 위해서는 namespace에 istio-injection=enabled
label을 추가해야 합니다.
아래는 예시 입니다.
$ kubectl create namespace kfserving
$ kubectl label namespace kfserving istio-injection=enabled