DevOps & Cloud Engineering(234)
-
RDS status가 "Storage-optimization"일 경우
개요RDS status가 "Storage-optimization" 상태로 유지되고 있다면 특별한 액션이 필요하지 않다. 수시간에서 최대 24시간 까지 걸릴 수 있으며, 자동으로 해소되므로 신경을 따로 쓰지 않아도 된다. 참고https://repost.aws/knowledge-center/rds-stuck-in-storage-optimization
2024.10.31 -
terraform을 잘 쓰기 위한 package (ftm, validate, lint, sec, docs, pre-commit)
개요terraform을 잘 쓰고 안전하게 사용하기 위한 각종 플러그인들과 package를 mac 사용자 기준으로 정리 해봤다. 대상 packageterraform fmtterraform validatetflinttfsecterraform_docspre commit 설치방법brew install tfsecbrew install tflintbrew install terraform-docsbrew install pre-commit 사용법$ git initcat .pre-commit-config.yamlrepos:- repo: https://github.com/antonbabenko/pre-commit-terraform rev: v1.96.1 hooks: - id: terraform_fmt -..
2024.10.29 -
docker desktop 대안
개요mac 환경에서 docker desktop을 사용하다보면 프로그램이 무겁고 느려서 개발 환경에 안 좋은 영향을 끼친다. 대안Docker desktop 삭제하고 orbstack을 깔면 해결된다.https://orbstack.dev/ 참고https://levelup.gitconnected.com/stop-using-docker-desktop-faster-alternative-nobody-uses-d36a64af09a6
2024.10.23 -
k8s(EKS) worker node 분석 툴 (eks node viewer)
개요EKS Worker node의 분포와 사용량 그리고 비용을 가시화 해주는 toolEKS가 아닌 k8s환경에서는 전부 동작(nks 확인) 설치brew tap aws/tapbrew install eks-node-viewer 실행./eks-node-viewer 참고https://github.com/awslabs/eks-node-viewer
2024.10.22 -
Amazon EKS (k8s) namespace 삭제가 안될 경우 (terminating status)
개요Amazon EKS에서 namespace를 삭제할 때 terminating으로 상태가 멈춰 있을 경우namespace 및 current context 확인 기능 추가 (2024.10.08)지우려는 대상 namespace가 있는 지 확인 기능 추가 (2024.10.15)Terraform Workspace 확인하는 기능 추가 (2024.10.29) 스크립트#!/bin/bash# 색상 코드 정의GREEN='\033[0;32m'YELLOW='\033[1;33m'RED='\033[0;31m'NC='\033[0m' # No Color (색상 초기화)# Define the stuck namespace as a variableNAMESPACE=$1# Check if the namespace is providedi..
2024.10.15 -
k8s worker node runtime 확인하는 방법
개요k8s worker node runtime 확인하는 방법 방법kubectl get nodes -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.status.nodeInfo.containerRuntimeVersion}{"\n"}{end}' 참고https://kubernetes.io/docs/tasks/administer-cluster/migrating-from-dockershim/find-out-runtime-you-use/
2024.10.14 -
eks cluster add-on 버전 호환성 및 버전 확인
개요eks cluster version에 따른 사용가능한 add-on 리스트와 버전과 add-on 버전이 확인 가능한 CLI 버전 및 호환성 확인# 특정 EKS Version에서 지원되는 특정 add-on 버전 리스트aws eks describe-addon-versions --kubernetes-version --addon-name --query 'addons[].addonVersions[].{Version: addonVersion, Defaultversion: compatibilities[0].defaultVersion}' --output table# 특정 EKS Version에서 지원되는 add-on 리스트aws eks describe-addon-versions --kubernetes-versi..
2024.10.04 -
k8s에 설치된 argocd 초기 비밀번호 확인하기
개요k8s에 설치된 argocd 초기 비밀번호는 따로 지정하지 않으면 임의로 생성이 된다. 확인 방법kubectl -n get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 --decode
2024.10.04 -
AWS S3 presigned URLs 생성 및 업로드 테스트
개요presigend url을 통해 업로드하는 테스트 스크립트 스크립트Downloading Object using presigned URLsaws s3 presign s3://DOC-EXAMPLE-BUCKET1/mydoc.txt --expires-in 604800Uploading Object using presigned URLs➜ ~ brew install python3➜ ~ pip3 install boto3 --break-system-packes➜ ~ vim pre.pyimport boto3BUCKET = ‘my-bucket’KEY = 'my-uploaded-file.txt's3 = boto3.client('s3')url = s3.generate_presigned_url( ClientMet..
2024.07.30 -
EC2 stopped 시간과 이름 출력 (AWS CLI)
스크립트#!/bin/bash# 정지된 인스턴스 목록 가져오기stopped_instances=$(aws ec2 describe-instances \ --filters "Name=instance-state-name,Values=stopped" \ --query "Reservations[*].Instances[*].[InstanceId, Tags[?Key=='Name'].Value | [0]]" \ --output json)# 테이블 헤더 출력printf "%-50s %-50s %-50s\n" "Instance ID" "Instance Name" "Stopped Time"# 각 인스턴스에 대해 정지 시간을 가져와서 출력echo "$stopped_instances" | jq -c '.[][]' ..
2024.07.29