공부집

아무거나 저장 본문

카테고리 없음

아무거나 저장

ikemen_hk 2024. 10. 31. 15:37

 

 

Probe Type 역할 언제 사용하는지 실패 시 동작 실행 순서
Startup Probe
(준비 상태 확인)
초기화 확인 초기화 시간이 긴 애플리케이션을 배포할 때. 컨테이너 재시작 1
Readiness Probe
(실행 상태 확인)
트래픽 처리 가능 여부 확인 애플리케이션이 외부 요청을 처리하기 전에 준비 시간을 필요로 하는 경우 Service에서 Pod 제거
트래픽 비활성화
2
Liveness Probe
(시작 상태 확인)
정상 동작 여부 확인 애플리케이션이 실행 중 활성 상태를 지속적으로 모니터링해야 하는 경우 컨테이너 재시작 3

 

# 서비스 별 terraform 구조

.
├── global/                 # 모든 서비스에 공통적인 설정 (프로바이더, 네트워크 등)
│   ├── networking/         # VPC, Subnet, 경로, 보안 그룹
│   │   ├── main.tf
│   │   ├── variables.tf
│   │   └── outputs.tf
│   └── shared-services/    # 공통 인프라 리소스 (E.g., S3, IAM 등)
│       ├── main.tf
│       ├── variables.tf
│       └── outputs.tf
├── service-a/              # 서비스 A 인프라 폴더
│   ├── envs/               # 환경별 설정
│   │   ├── dev/
│   │   │   ├── terraform.tfvars  # dev 환경 변수
│   │   │   └── backend.tf        # S3 백엔드
│   │   └── prod/
│   │       ├── terraform.tfvars  # prod 환경 변수
│   │       └── backend.tf
│   ├── main.tf             # 서비스 A의 주요 인프라 정의
│   ├── variables.tf        # 입력 변수 정의
│   ├── outputs.tf          # 출력 변수 정의
│   └── modules/            # 서비스 A 전용 모듈
│       ├── compute/        # EC2, Lambda, ECS 등 컴퓨팅 리소스
│       ├── storage/        # 서비스 자체에 필요한 DB나 S3 구성
│       └── networking/     # 네트워크 구성 (VPC나 Subnet)
├── service-b/              # 서비스 B 인프라 폴더
│   ├── envs/               # 환경 설정 (dev/staging/prod)
│   │   ├── dev/
│   │   └── staging/
│   ├── main.tf
│   ├── variables.tf
│   ├── outputs.tf
│   └── modules/
│       ├── compute/
│       └── additional/
└── README.md
ceph osd df tree
ceph df

sudo ceph-volume lvm list

ceph osd out 3
systemctl stop ceph-osd@3
sudo pvremove /dev/sdb
sudo vgremove ceph-d65dfc28-e23f-432c-943b-574ee74aa669
juju run ceph-osd/7 zap-disk devices='/dev/sdb' i-really-mean-it=yes
ceph osd rm 3
ceph auth del osd.3
juju run ceph-osd/7 add-disk osd-devices='/dev/sdb'

 

configmap --from-file=옵션으로 생성

 

  • 403 에러
ubuntu@rke1-launcher2:~/.kube$ argocd cluster add cruzapim-dev --kubeconfig ~/.kube/cruzapim-dev 
WARNING: This will create a service account `argocd-manager` on the cluster referenced by context `cruzapim-dev` with full cluster level privileges. Do you want to continue [y/N]? y
INFO[0001] ServiceAccount "argocd-manager" already exists in namespace "kube-system" 
INFO[0001] ClusterRole "argocd-manager-role" updated    
INFO[0001] ClusterRoleBinding "argocd-manager-role-binding" updated 
FATA[0001] rpc error: code = PermissionDenied desc = {"Code":{"Code":"Forbidden","Status":403},"Message":"clusters.management.cattle.io \"c-gzb5h\" is forbidden: User \"system:unauthenticated\" cannot get resource \"clusters\" in API group \"management.cattle.io\" at the cluster scope","Cause":null,"FieldName":""} 

 

랜처에서 jwt 유효화 시켜줘야 함

 

ip link show tapae1cbe39-04 
sudo ip link set tap45c19d97-d8 txqueuelen 10000

virsh edit 2efc597d-89c1-4028-a7d1-4967269ff480
juju config nova-compute virtio-net-tx-queue-size=10240

 

wget https://get.helm.sh/helm-v3.16.2-linux-amd64.tar.gz
tar -zxvf helm-v3.16.2-linux-amd64.tar.gz
sudo cp linux-amd64/helm /usr/local/bin/helm

mkdir -p chart/repo
helm create mychart
mv mychart chart/repo/
helm repo add nexus-helm https://nexus.direa.synology.me/repository/helm-hosted/ --username 100 --password jiin # 저장소 추가
helm repo update
helm package mychart
curl -u 100:jiin --upload-file mychart-0.1.0.tgz https://nexus.direa.synology.me/repository/helm-hosted/
helm install mychart . # 클러스터에 배포
helm upgrade mychart . # 수정사항 반영

helm install common nexus-helm/common # 레포에서 가져오기

--- signoz 설치 과정 ---
helm search repo signoz --versions
helm pull signoz/signoz --untar --version 0.39.1

helm package signoz
curl -u 100:jiin --upload-file signoz-0.39.1.tgz https://nexus.direa.synology.me/repository/helm-hosted/

helm install signoz nexus-helm/signoz --namespace cruz-apim-logs --create-namespace # signoz 처음 설치할 때
helm upgrade signoz nexus-helm/signoz --namespace cruz-apim-logs --create-namespace # signoz 2번째 이후로

signoz 서비스 타입 변경은signoz/values.yaml 에서 frontend.service.type 값 변경해주세요.

--- kubecost 설치 과정 ---
helm repo add cost-analyzer https://kubecost.github.io/cost-analyzer/

helm pull cost-analyzer/cost-analyzer --untar

helm package cost-analyzer
curl -u 100:jiin --upload-file cost-analyzer-2.4.2.tgz https://nexus.direa.synology.me/repository/helm-hosted/

helm upgrade --install kubecost cost-analyzer/cost-analyzer --namespace kubecost --create-namespace

kubecost 서비스 타입 변경은cost-analyzer/values.yaml 에서 service.type 값 변경해주세요.

 

----------

 

 

 

 

 

 

 

 

 

Comments