Skip to content

Commit

Permalink
Istio installication manaul (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
choisungwook authored Dec 14, 2024
1 parent 4f8ef5a commit 0afaa77
Show file tree
Hide file tree
Showing 16 changed files with 158 additions and 12 deletions.
8 changes: 8 additions & 0 deletions kubernetes/istio/install/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## 개요
* istio 설치 문서


## 목차
* [EKS에서 ArgoCD와 helm chart를 사용하여 istio 설치](./eks)
* [kind 클러스터에 istio 설치](./kind_cluster/)
* [helm chart를 사용하여 istio 설치](./manual_helm/)
Empty file.
8 changes: 8 additions & 0 deletions kubernetes/istio/install/eks/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## 개요
* EKS에서 ArgoCD와 helm chart를 사용하여 istio 설치

## 설치 방법

```sh
kubectl apply -f ./argocd_bootstrap/argocd-apps.yaml
```
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 개요
## 개요
* istio 애드온 설치 메뉴얼

# 목차
## 목차
* [prometheus](./prometheus.md)
* [grafana](./grafana.md)
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# 개요
## 개요
* istio mesh메트릭을 시각화하기 위해 grafana 설치

# 전제조건
## 전제조건
* proemtheus가 설치되어 있어야 함
* [설치 문서 바로가기](./prometheus.md)

# 설치방법
## 설치방법
* helm values에서 AWS ACM과 host를 꼭 여러분 껄로 변경하세요!!!

```sh
Expand All @@ -17,7 +17,7 @@ helm upgrade --install \
grafana grafana/grafana
```

# 그라파나 admin 비밀번호
## 그라파나 admin 비밀번호

```sh
kubectl get secret --namespace istio-system grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# 개요
## 개요
* istio mesh메트릭 수집을 담당하는 프로메테우스 설치

# 선수지식
## 선수지식
* helm chart로 istio를 설치하면 프로메테우스 exporter설정이 디폴트로 활성화 되어 있다.

```sh
--set meshConfig.enablePrometheusMerge=true
```

# 설치방법
## 설치방법

* helm values
* 스토리지를 사용하지 않고 인메모리를 사용
* retenetion 설정: 1d와 200MB
Expand All @@ -26,5 +27,5 @@ helm upgrade --install \
prometheus prometheus-community/prometheus
```

# 참고자료
## 참고자료
* https://istio.io/latest/docs/ops/integrations/prometheus/
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
chart: argocd-apps
helm:
valueFiles:
- '$values/kubernetes/istio/install/argocd_bootstrap/values/argocd-apps.yaml'
- '$values/kubernetes/istio/install/eks/argocd_bootstrap/values/argocd-apps.yaml'
- repoURL: 'https://github.com/choisungwook/portfolio.git'
targetRevision: master
ref: values
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## 개요
* istio 관리를 위한 애드온 helm values

## 목차
* [grafana](./grafana.yaml)
* [prometheus](./prometheus.yaml)
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ applicationsets:
chart: '{{chart}}'
helm:
valueFiles:
- '$values/kubernetes/istio/install/argocd_bootstrap/values/{{valueFile}}'
- '$values/kubernetes/istio/install/eks/argocd_bootstrap/values/{{valueFile}}'
- repoURL: 'https://github.com/choisungwook/portfolio.git'
targetRevision: master
ref: values
Expand Down
7 changes: 7 additions & 0 deletions kubernetes/istio/install/kind_cluster/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
install-istioctl:
@echo "Install istioctl"
@brew install istioctl

up:
@echo "Install kind cluster"
@kind create cluster --config kind-config.yaml
68 changes: 68 additions & 0 deletions kubernetes/istio/install/kind_cluster/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
## 개요
* kind 클러스터에 istio 설치

## 전제조건
* docker가 설치되어 있어야 합니다.
* kind CLI가 설치되어 있어야 합니다.

## kind 클러스터 생성

1. kind 클러스터 생성

```sh
kind create cluster --config kind-config.yaml
```

2. kind 클러스터 생성 확인

```sh
$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
istio-control-plane Ready control-plane 3m51s v1.31.4
istio-worker Ready <none> 3m40s v1.31.4
istio-worker2 Ready <none> 3m41s v1.31.4
```

## istio 설치

1. istioctl 설치

```sh
brew install istioctl
```

2. istioctl version 확인

```sh
$ istioctl version
Istio is not present in the cluster: no running Istio pods in namespace "istio-system"
client version: 1.24.1
```

3. istio 설치: demo 프로파일 사용

```sh
istioctl install --set profile=demo --skip-confirmation
✔ Istio core installed ⛵️
✔ Istiod installed 🧠
✔ Egress gateways installed 🛫
✔ Ingress gateways installed 🛬
✔ Installation complete
```

![](./imgs/istio-profile.png)


4. istio 설치 확인

```sh
$ kubectl get pod -n istio-system
NAME READY STATUS RESTARTS AGE
istio-egressgateway-94bdb56cb-kxsq5 1/1 Running 0 99s
istio-ingressgateway-86cb558598-zbbv7 1/1 Running 0 99s
istiod-7dccd8956d-8xlzv 1/1 Running 0 113s
```

## 참고자료
* https://istio.io/latest/docs/setup/platform-setup/kind/
* https://medium.com/@s4l1h/how-to-install-kind-and-istio-ingress-controller-3b510834c762
25 changes: 25 additions & 0 deletions kubernetes/istio/install/kind_cluster/kind-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
name: istio
nodes:
- role: control-plane
image: kindest/node:v1.31.4
kubeadmConfigPatches:
- |
kind: InitConfiguration
nodeRegistration:
kubeletExtraArgs:
node-labels: "ingress-ready=true"
extraPortMappings:
# istio ingress controller
- containerPort: 80
hostPort: 80
protocol: TCP
# istio ingress controller
- containerPort: 443
hostPort: 443
protocol: TCP
- role: worker
image: kindest/node:v1.31.4
- role: worker
image: kindest/node:v1.31.4
22 changes: 22 additions & 0 deletions kubernetes/istio/install/manual_helm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# 개요
* helm으로 istio 설치

# 설치 방법
1. **istio-base** helm chart 릴리즈
2. **istiod helm** chart 릴리즈
3. **istio-ingress** chart 릴리즈
4. **(옵션) istio-egress** helm chart 릴리즈


```sh
helm repo add istio https://istio-release.storage.googleapis.com/charts
helm repo update
```

* helm chart 릴리즈

```sh
helm install istio-base istio/base --version 1.24.0 -n istio-system --create-namespace --set defaultRevision=default
helm install istiod istio/istiod --version 1.24.0 -n istio-system --create-namespace --wait
helm install istio-ingress istio/gateway --version 1.24.0 -n istio-system --create-namespace --wait
```
1 change: 1 addition & 0 deletions mkdocs/docs/kubernetes/istio

0 comments on commit 0afaa77

Please sign in to comment.