현재 경로 하위에 있는 특정 폴더 하위 모든 yaml 의 string 치환
find . -type f -path "*/<common sub folder>/*.yaml" -exec sed -i 's/<target string>/<new string>/g' {} +
현재 경로 하위에 존재하는 특정 yaml 두 개를 한번에 kubectl 배포
find . -type f \( -name "<name1>.yaml" -o -name "<name2>.yaml" \) -exec kubectl apply -f {} \;
ArgoCD 시크릿 업데이트 (admin 패스워드 변경)
// ArgoCD Pod 안에 들어가서 ArgoCD CLI 활용. 결과값은 Hash 형태로 출력됨
argocd account bcrypt --password 'NEW_PASSWORD'
// 네임스페이스 입력
NS=argocd
HASH='<Hash string>'
kubectl -n $NS patch secret argocd-secret --type merge -p "{\"stringData\": {\"admin.password\": \"${HASH}\", \"admin.passwordMtime\": \"$(date -u +%FT%TZ)\"}}"
(git) 방금 push 한 최신 commit 취소하기
git revert HEAD
git push
bash 쉘에 alias 등록하여 커맨드 창에서 fblog 키워드 입력하면 running중인 모든 Fluent Bit Pod 로그 출력
alias fblog='kubectl logs -n <fluent-bit namespace> -l app.kubernetes.io/name=fluent-bit --all-containers=true --prefix=true -f'
'devops > ETC' 카테고리의 다른 글
| 교차 계정 AMP 설정하기 (EKS Prometheus pods to Amazon Managed Prometheus service in Cross Account) (0) | 2024.06.28 |
|---|---|
| Hashcorp Vault with a simple demo (0) | 2024.06.23 |
| Pulumi with a simple demo (0) | 2024.06.23 |
| Istio - service mesh (2) | 2024.06.15 |
| Aqua Security / Trivy (2) | 2024.06.15 |