Oracle cloud argocd network 이슈

code_able·2025년 10월 6일
0

OCI OKE에서 ArgoCD Private Repository 연결 실패 해결

문제 상황

  • OCI OKE 클러스터에서 ArgoCD 설치 후 private GitHub repository 연결 실패
  • dial tcp 20.200.245.247:22: connect: connection timed out 에러 발생

문제 진단 과정

1. 네트워크 설정 확인

# 외부 연결 테스트
kubectl run test-curl --image=curlimages/curl --restart=Never -- curl -m 5 -I https://github.com
# 결과: Connection timed out

2. OCI VCN 설정 점검

  • ✅ Security List: 0.0.0.0/0 Egress Rules 설정됨
  • ✅ Route Table: Internet Gateway 연결됨
  • ✅ Public Subnet: 워커 노드에 Public IP 할당됨
  • ✅ NSG: 적용되지 않음

3. 핵심 문제 발견

# Host network Pod에서는 연결 성공
kubectl exec -n kube-system kube-proxy-xxx -- curl -I https://github.com
# HTTP/2 200 ✅

# 일반 Pod에서는 연결 실패  
kubectl run test --image=curlimages/curl -- curl -I https://github.com
# Connection timed out ❌

원인: OCI VCN-Native CNI에서 Pod의 외부 연결을 위한 SNAT 설정 이슈

임시 해결책

ArgoCD repo-server를 hostNetwork로 실행

# repo-server 설정 백업
kubectl get deployment argocd-repo-server -n argocd -o yaml > backup.yaml

# hostNetwork 설정 적용
kubectl patch deployment argocd-repo-server -n argocd --patch='{
  "spec": {
    "template": {
      "spec": {
        "hostNetwork": true,
        "dnsPolicy": "ClusterFirstWithHostNet"
      }
    }
  }
}'

결과 확인

kubectl get pods -n argocd | grep repo-server
# argocd-repo-server-xxx  1/1  Running

결론

  • OCI OKE의 VCN-Native CNI에서 Pod 외부 연결 문제 발생
  • hostNetwork 설정으로 임시 해결 가능
  • 근본적 해결을 위해서는 OCI 지원팀 문의 필요

참고사항

  • 이 문제는 OKE Quick Create로 생성된 클러스터에서 발생
  • Security List, Route Table 등 모든 설정이 올바르더라도 Pod 레벨에서 외부 연결 차단됨
  • Production 환경에서는 OCI 지원을 통한 근본적 해결 권장
profile
할수 있다! code able

0개의 댓글