Skip to content

Commit 6b355be

Browse files
author
kkumtree
committed
post: calico basic
1 parent 28b64df commit 6b355be

File tree

3 files changed

+100
-81
lines changed

3 files changed

+100
-81
lines changed
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
---
2+
date: 2024-09-18T20:52:16+09:00
3+
title: "제목"
4+
tags:
5+
- tag1
6+
- tag2
7+
authors:
8+
- name: # 이름
9+
bio: # 자기소개
10+
email: example@example.com # Email
11+
launchpad: hello # Launchpad Username
12+
github: hello # GitHub Username
13+
profile: profile.jpg # 프로필 이미지 URL
14+
image: cover.png # 커버 이미지 URL
15+
draft: true # 글 초안 여부
16+
---
17+
18+
Contents here...
19+
20+
21+
22+
## 3. Retina 설치 <재구성 필요>
23+
24+
> Network Monitoring Tool인 [Retina](https://github.com/microsoft/retina)를 설치해봅니다.
25+
26+
- Helm이 있어야합니다. 공식 Docs가 제일 정확합니다.
27+
28+
### (1) Helm chart 설치
29+
30+
- 링크: <https://retina.sh/docs/Installation/Setup>
31+
32+
Basic Mode 로 진행해보겠습니다.
33+
34+
```bash
35+
# Set the version to a specific version here or get latest version from GitHub API.
36+
VERSION=$( curl -sL https://api.github.com/repos/microsoft/retina/releases/latest | jq -r .name)
37+
helm upgrade --install retina oci://ghcr.io/microsoft/retina/charts/retina \
38+
--version $VERSION \
39+
--set image.tag=$VERSION \
40+
--set operator.tag=$VERSION \
41+
--set logLevel=info \
42+
--set enabledPlugin_linux="\[dropreason\,packetforward\,linuxutil\,dns\]"
43+
```
44+
45+
다음과 같은 출력값이 나옵니다.
46+
47+
```bash
48+
Release "retina" does not exist. Installing it now.
49+
Pulled: ghcr.io/microsoft/retina/charts/retina:v0.0.16
50+
Digest: sha256:384e4b45d37ab49b6e2e742012e3d49230ce2be102895dccb504b42540091419
51+
NAME: retina
52+
LAST DEPLOYED: Sun Sep 15 19:29:03 2024
53+
NAMESPACE: default
54+
STATUS: deployed
55+
REVISION: 1
56+
NOTES:
57+
1. Installing retina service using helm: helm install retina ./deploy/legacy/manifests/controller/helm/retina/ --namespace kube-system --dependency-update
58+
2. Cleaning up/uninstalling/deleting retina and dependencies related:
59+
```
60+
61+
### (2) Prometheus 설치
62+
63+
앞서 출력값의 NOTES.1을 그대로 치면 에러가 정상적으로 나야합니다. 해당 되는 파일을 받지 않았기 때문입니다.
64+
65+
- 에러 로그를 보면, 이 또한 Document를 안내하는 것을 알 수 있습니다. https://github.com/microsoft/retina/blob/3d2c7a55f8c0388df271453f5fc7b166c2f275be/deploy/legacy/prometheus/values.yaml
66+
67+
- Prometheus 커뮤니티 차트를 사용합니다. Legacy 모드로 진행하나, Github를 살펴보니 Hubble을 쓰는 방식도 있는 것 같습니다.
68+
69+
- 앞서 언급된 파일의 경로: <https://github.com/microsoft/retina/blob/3d2c7a55f8c0388df271453f5fc7b166c2f275be/deploy/legacy/prometheus/values.yaml>
70+
71+
```bash
72+
(⎈|HomeLab:default) root@k8s-m:~/retina# mkdir -p deploy/legacy/prometheus
73+
(⎈|HomeLab:default) root@k8s-m:~/retina# touch deploy/legacy/prometheus/values.yaml
74+
(⎈|HomeLab:default) root@k8s-m:~/retina# helm install prometheus -n kube-system -f deploy/legacy/prometheus/values.yaml prometheus-community/kube-prometheus-stack
75+
NAME: prometheus
76+
LAST DEPLOYED: Sun Sep 15 19:59:33 2024
77+
NAMESPACE: kube-system
78+
STATUS: deployed
79+
REVISION: 1
80+
NOTES:
81+
kube-prometheus-stack has been installed. Check its status by running:
82+
kubectl --namespace kube-system get pods -l "release=prometheus"
83+
84+
Visit https://github.com/prometheus-operator/kube-prometheus for instructions on how to create & configure Alertmanager and Prometheus instances using the Operator.
85+
```
86+
87+
- <에러남> 안내서에 따라 접속을 위해 Port-Forward 설정한 후 링크를 얻습니다.
88+
- 다만, 해당 명령어는 foreground로 실행하는 것이기에 새로운 터미널에서 하는 것을 권장합니다.
89+
90+
```bash
91+
# Ternimal 1
92+
kubectl port-forward --namespace kube-system svc/prometheus-operated 9090
93+
# Terminal 2
94+
echo -e "kubeskoop URL = http://$(curl -s ipinfo.io/ip):9090"
95+
```
Loading

content/post/kans-3w-calico-overview/index.md

Lines changed: 5 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
date: 2024-09-15T18:40:22+09:00
3-
title: "Calico 및 Retina 설치 구성"
3+
title: "Calico 및 메트릭 수집 구성"
44
tags:
55
- kans
66
- cni
@@ -13,8 +13,8 @@ authors:
1313
launchpad: mscho7969
1414
github: kkumtree
1515
profile: https://avatars.githubusercontent.com/u/52643858?v=4
16-
image: cover.png
17-
draft: true
16+
image: images/calico_p8s_basic.png
17+
draft: false
1818
---
1919

2020
## 1. Calico 설치
@@ -514,82 +514,6 @@ kubectl get svc,ep -n calico-monitoring
514514
echo -e "Prometheus URL = http://$(curl -s ipinfo.io/ip):30001/graph"
515515
# Prometheus URL = http://3.35.169.117:30001/graph
516516
```
517+
Target에서 `felix_metrics`가 잡힌 것을 확인하였습니다.
517518
518-
519-
520-
521-
522-
## 3. Retina 설치 <재구성 필요>
523-
524-
> Network Monitoring Tool인 [Retina](https://github.com/microsoft/retina)를 설치해봅니다.
525-
526-
- Helm이 있어야합니다. 공식 Docs가 제일 정확합니다.
527-
528-
### (1) Helm chart 설치
529-
530-
- 링크: <https://retina.sh/docs/Installation/Setup>
531-
532-
Basic Mode 로 진행해보겠습니다.
533-
534-
```bash
535-
# Set the version to a specific version here or get latest version from GitHub API.
536-
VERSION=$( curl -sL https://api.github.com/repos/microsoft/retina/releases/latest | jq -r .name)
537-
helm upgrade --install retina oci://ghcr.io/microsoft/retina/charts/retina \
538-
--version $VERSION \
539-
--set image.tag=$VERSION \
540-
--set operator.tag=$VERSION \
541-
--set logLevel=info \
542-
--set enabledPlugin_linux="\[dropreason\,packetforward\,linuxutil\,dns\]"
543-
```
544-
545-
다음과 같은 출력값이 나옵니다.
546-
547-
```bash
548-
Release "retina" does not exist. Installing it now.
549-
Pulled: ghcr.io/microsoft/retina/charts/retina:v0.0.16
550-
Digest: sha256:384e4b45d37ab49b6e2e742012e3d49230ce2be102895dccb504b42540091419
551-
NAME: retina
552-
LAST DEPLOYED: Sun Sep 15 19:29:03 2024
553-
NAMESPACE: default
554-
STATUS: deployed
555-
REVISION: 1
556-
NOTES:
557-
1. Installing retina service using helm: helm install retina ./deploy/legacy/manifests/controller/helm/retina/ --namespace kube-system --dependency-update
558-
2. Cleaning up/uninstalling/deleting retina and dependencies related:
559-
```
560-
561-
### (2) Prometheus 설치
562-
563-
앞서 출력값의 NOTES.1을 그대로 치면 에러가 정상적으로 나야합니다. 해당 되는 파일을 받지 않았기 때문입니다.
564-
565-
- 에러 로그를 보면, 이 또한 Document를 안내하는 것을 알 수 있습니다. https://github.com/microsoft/retina/blob/3d2c7a55f8c0388df271453f5fc7b166c2f275be/deploy/legacy/prometheus/values.yaml
566-
567-
- Prometheus 커뮤니티 차트를 사용합니다. Legacy 모드로 진행하나, Github를 살펴보니 Hubble을 쓰는 방식도 있는 것 같습니다.
568-
569-
- 앞서 언급된 파일의 경로: <https://github.com/microsoft/retina/blob/3d2c7a55f8c0388df271453f5fc7b166c2f275be/deploy/legacy/prometheus/values.yaml>
570-
571-
```bash
572-
(⎈|HomeLab:default) root@k8s-m:~/retina# mkdir -p deploy/legacy/prometheus
573-
(⎈|HomeLab:default) root@k8s-m:~/retina# touch deploy/legacy/prometheus/values.yaml
574-
(⎈|HomeLab:default) root@k8s-m:~/retina# helm install prometheus -n kube-system -f deploy/legacy/prometheus/values.yaml prometheus-community/kube-prometheus-stack
575-
NAME: prometheus
576-
LAST DEPLOYED: Sun Sep 15 19:59:33 2024
577-
NAMESPACE: kube-system
578-
STATUS: deployed
579-
REVISION: 1
580-
NOTES:
581-
kube-prometheus-stack has been installed. Check its status by running:
582-
kubectl --namespace kube-system get pods -l "release=prometheus"
583-
584-
Visit https://github.com/prometheus-operator/kube-prometheus for instructions on how to create & configure Alertmanager and Prometheus instances using the Operator.
585-
```
586-
587-
- <에러남> 안내서에 따라 접속을 위해 Port-Forward 설정한 후 링크를 얻습니다.
588-
- 다만, 해당 명령어는 foreground로 실행하는 것이기에 새로운 터미널에서 하는 것을 권장합니다.
589-
590-
```bash
591-
# Ternimal 1
592-
kubectl port-forward --namespace kube-system svc/prometheus-operated 9090
593-
# Terminal 2
594-
echo -e "kubeskoop URL = http://$(curl -s ipinfo.io/ip):9090"
595-
```
519+
![Calico Prometheus](/images/calico_p8s_basic.png)

0 commit comments

Comments
 (0)