EKS Baseline App Upgrade


aws-ebs-csi-driver

AWS EBS 볼륨을 Kubernetes 에서 동적으로 프로비저닝하고 파드 라이프사이클에 맞춰 attach/detach 를 자동화하는 CSI 드라이버다. StorageClass 와 PVC 를 통해 필요한 크기 및 타입 (gp3, io2 등) AZ 제약 등을 선언적으로 정의할 수 있으며, 노드 장애 시 재스케줄된 파드에 볼륨을 재부착해 가용성을 높인다.

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: aws-ebs-csi-driver
  namespace: argocd
spec:
  project: default
  source:
    repoURL: https://kubernetes-sigs.github.io/aws-ebs-csi-driver
    chart: aws-ebs-csi-driver
    targetRevision: X.Y.Z  # 차트 버전 고정
    helm:
      values: |
        controller:
          serviceAccount:
            create: true
            # annotations:
            #   eks.amazonaws.com/role-arn: arn:aws:iam::<ACCOUNT_ID>:role/<ROLE_NAME>
  destination:
    server: https://kubernetes.default.svc
    namespace: kube-system
  syncPolicy:
    automated:
      prune: true
      selfHeal: true

ArgoCD 와 Helm Chart 로 Kubernetes Cluster 에 간편하게 설치할 수 있다. 새로운 버전 릴리즈가 나오면 targetRevision 을 새 차트 버전으로 올리고 Sync, 롤백은 이전 버전으로 되돌린 후 Sync.

aws-efs-csi-driver

EFS 파일 시스템을 Kubernetes 파드에 공유 스토리지로 제공하는 CSI 드라이버다.

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: aws-efs-csi-driver
  namespace: argocd
spec:
  project: default
  source:
    repoURL: https://kubernetes-sigs.github.io/aws-efs-csi-driver
    chart: aws-efs-csi-driver
    targetRevision: X.Y.Z
    helm:
      values: |
        controller:
          serviceAccount:
            create: true
            # annotations:
            #   eks.amazonaws.com/role-arn: arn:aws:iam::<ACCOUNT_ID>:role/<ROLE_NAME>
  destination:
    server: https://kubernetes.default.svc
    namespace: kube-system

ArgoCD 와 Helm Chart 로 Kubernetes Cluster 에 간편하게 설치할 수 있다. 새로운 버전 릴리즈가 나오면 targetRevision 을 새 차트 버전으로 올리고 Sync, 롤백은 이전 버전으로 되돌린 후 Sync.

aws-load-balancer-controller

Ingress 와 Service 리소스를 관찰하여 ALB/NLB 등 AWS 로드밸런서를 선언적으로 관리하는 컨트롤러다. ALB Ingress 의 경우 리스너 규칙/타깃그룹/보안그룹/서브넷 태깅 요건 등을 어노테이션으로 제어하고, NLB는 L4 수준의 고성능 트래픽 분산을 제공한다.

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: aws-load-balancer-controller
  namespace: argocd
spec:
  project: default
  source:
    repoURL: https://aws.github.io/eks-charts
    chart: aws-load-balancer-controller
    targetRevision: X.Y.Z
    helm:
      values: |
        clusterName: <EKS_CLUSTER_NAME>
        serviceAccount:
          create: true
          # annotations:
          #   eks.amazonaws.com/role-arn: arn:aws:iam::<ACCOUNT_ID>:role/<ROLE_NAME>
  destination:
    server: https://kubernetes.default.svc
    namespace: kube-system

ArgoCD 와 Helm Chart 로 Kubernetes Cluster 에 간편하게 설치할 수 있다. 새로운 버전 릴리즈가 나오면 targetRevision 을 새 차트 버전으로 올리고 Sync, 롤백은 이전 버전으로 되돌린 후 Sync.

coredns

클러스터 내부 서비스 디스커버리를 담당하는 DNS 서버로, 파드에서의 DNS 쿼리를 kube-dns/CoreDNS 로 라우팅하여 서비스 이름을 IP 로 해석한다. EKS 에서는 관리형 애드온으로 운영하는 것이 일반적이며, 직접 Helm 으로 배포할 경우 kube-system 네임스페이스 내 기존 구성과 충돌하지 않도록 주의해야 한다.

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: coredns
  namespace: argocd
spec:
  project: default
  source:
    repoURL: https://coredns.github.io/helm
    chart: coredns
    targetRevision: X.Y.Z
    helm:
      values: |
        replicaCount: 2
  destination:
    server: https://kubernetes.default.svc
    namespace: kube-system

ArgoCD 와 Helm Chart 로 Kubernetes Cluster 에 간편하게 설치할 수 있다. 관리형 애드온을 사용하는 경우 중복 배포를 피하고, 업그레이드 시에는 targetRevision 만 새 버전으로 올린 뒤 Sync 하자.

datadog-agent

클러스터/노드/파드 수준의 메트릭, 로그, 트레이스를 수집해 Datadog 으로 전송하는 에이전트 패키지다. DaemonSet 에이전트(인프라/로그)와 APM(Trace) 에이전트를 조합해 배포하며, kube-state-metrics, cluster-agent 등과의 통합으로 컨트롤플레인/오브젝트 상태 메트릭까지 수집할 수 있다.

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: datadog-agent
  namespace: argocd
spec:
  project: default
  source:
    repoURL: https://helm.datadoghq.com
    chart: datadog
    targetRevision: X.Y.Z
    helm:
      values: |
        datadog:
          site: datadoghq.com
          apiKeyExistingSecret: datadog-secret
          logs:
            enabled: true
          apm:
            enabled: true
  destination:
    server: https://kubernetes.default.svc
    namespace: datadog

ArgoCD 와 Helm Chart 로 Kubernetes Cluster 에 간편하게 설치할 수 있다. 새로운 버전 릴리즈가 나오면 targetRevision 을 새 차트 버전으로 올리고 Sync, 필요 시 이미지 태그를 values 로 오버라이드하며, 롤백은 이전 버전으로 되돌린 후 Sync.

external-dns

Ingress, Service, Gateway 등의 변경을 감시해 Route53 같은 DNS 제공자에 A/AAAA/CNAME/TXT 레코드를 자동으로 생성, 갱신, 정리하는 컨트롤러다. 여러 클러스터를 동일한 도메인에 연결할 때는 txtOwnerId 와 domainFilters 를 통해 소유권 충돌과 오작동을 방지한다.

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: external-dns
  namespace: argocd
spec:
  project: default
  source:
    repoURL: https://kubernetes-sigs.github.io/external-dns/
    chart: external-dns
    targetRevision: X.Y.Z
    helm:
      values: |
        provider: aws
        policy: upsert-only
        txtOwnerId: <CLUSTER_NAME>
        # domainFilters:
        #   - example.com
        serviceAccount:
          annotations:
            # IRSA 예시
            # eks.amazonaws.com/role-arn: arn:aws:iam::<ACCOUNT_ID>:role/<ROLE_NAME>
  destination:
    server: https://kubernetes.default.svc
    namespace: external-dns

ArgoCD 와 Helm Chart 로 Kubernetes Cluster 에 간편하게 설치할 수 있다. 새로운 버전 릴리즈가 나오면 targetRevision 을 새 차트 버전으로 올리고 Sync, 롤백은 이전 버전으로 되돌린 후 Sync.

istio

서비스 메시 솔루션으로, 트래픽 라우팅(가중치/카나리/미러링), 보안(mTLS/정책), 관찰성(메트릭/로그/트레이스)을 제공한다. 설치는 보통 CRD 를 포함한 base → 컨트롤플레인(istiod) → 데이터플레인(gateway) 순으로 진행하며, 네임스페이스 자동 사이드카 주입 설정과 리소스 요청/제한 조정이 초기 안정성에 중요하다. 업그레이드는 컨트롤플레인을 먼저 올린 뒤 워크로드 사이드카를 점진적으로 롤링한다.

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: istio-base
  namespace: argocd
spec:
  project: default
  source:
    repoURL: https://istio-release.storage.googleapis.com/charts
    chart: istio-base
    targetRevision: X.Y.Z
  destination:
    server: https://kubernetes.default.svc
    namespace: istio-system
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: istiod
  namespace: argocd
spec:
  project: default
  source:
    repoURL: https://istio-release.storage.googleapis.com/charts
    chart: istiod
    targetRevision: X.Y.Z
  destination:
    server: https://kubernetes.default.svc
    namespace: istio-system

ArgoCD 와 Helm Chart 로 Kubernetes Cluster 에 간편하게 설치할 수 있다. 업그레이드는 base→istiod→gateway 순서로 targetRevision 을 올린 뒤 Sync 하며, 데이터플레인 사이드카 롤링을 병행한다.

kong-ingress-controller

Kong API 게이트웨이를 Kubernetes Ingress/Gateway 컨트롤러로 통합해 L7 라우팅과 인증, 속도제한, 관측 플러그인을 활용할 수 있게 한다.

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: kong-ingress-controller
  namespace: argocd
spec:
  project: default
  source:
    repoURL: https://charts.konghq.com
    chart: kong
    targetRevision: X.Y.Z
    helm:
      values: |
        ingressController:
          enabled: true
  destination:
    server: https://kubernetes.default.svc
    namespace: kong

ArgoCD 와 Helm Chart 로 Kubernetes Cluster 에 간편하게 설치할 수 있다. 새로운 버전 릴리즈가 나오면 targetRevision 을 새 차트 버전으로 올리고 Sync, 롤백은 이전 버전으로 되돌린 후 Sync.

vault

시크릿 저장과 동적 크리덴셜 발급(PKI/DB/클라우드 자격증명)을 제공하며, K8s Auth와 Injector로 파드에 시크릿을 안전하게 주입한다.

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: vault
  namespace: argocd
spec:
  project: default
  source:
    repoURL: https://helm.releases.hashicorp.com
    chart: vault
    targetRevision: X.Y.Z
    helm:
      values: |
        server:
          ha:
            enabled: true
          # injector:
          #   enabled: true
  destination:
    server: https://kubernetes.default.svc
    namespace: vault

ArgoCD 와 Helm Chart 로 Kubernetes Cluster 에 간편하게 설치할 수 있다. 새로운 버전 릴리즈가 나오면 targetRevision 을 새 차트 버전으로 올리고 Sync, 롤백은 이전 버전으로 되돌린 후 Sync.

Troubleshooting


error when patching "/dev/shm/3212118736": StorageClass.storage.k8s.io "gp3" is invalid: volumeBindingMode: Invalid value: "WaitForFirstConsumer": field is immutable
  • /dev/shm 은 리눅스의 공유 메모리 영역
    • tmpfs 로 마운트되어 있고 RAM 기반이라 빠름
    • 주로 IPC 나 일시적인 데이터 버퍼링에 사용됨
    • 재부팅 시 휘발되는 공간
  • /dev/shm/3212118736 은 보통 임시로 생성된 Manifest 등을 저장하기 위한 파일
  • ArgoCD 가 Git 에서 가져온 Desired Manifest 를 위 임시 파일로 저장하고 kubectl 를 실행하는 도중 에러 발생
  • StorageClassvolumeBindingMode 필드는 불변인데 ArgoCD 가 변경을 시도해서 발생
  • Live Manifest 는 Immediate 인데 Desired Manifest 는 WaitForFirstConsumer
level=fatal msg="failed to sync *v1.EndpointSlice: context deadline exceeded with timeout 1m0s"
  • external-dns 업그레이드 중 CrashLoopBackOff 이슈
  • external-dns 바이너리는 0.17.0 에서 0.19.0 으로 업그레이드
  • chart version 을 1.17.0 에서 1.19.0 으로 올리지 않아서 발생한 이슈
  • chart 에 EndpointSlice API 접근이 필요하게 변경되었는데 RBAC 이 0.17.0 바이너리 기준이라 발생
0/3 nodes are available: 1 Insufficient cpu, 1 Insufficient memory, 1 node(s) didn't match pod topology spread constraints. preemption: 0/3 nodes are available: 3 No preemption victims found for incoming pod.
  • 말 그대로 리소스가 부족해서 발생
kubectl describe nodes | grep -A5 "Allocated resources"
  • 위 명령어로 cpu, memory Request 를 확인하면 됨

Restarting istio-enabled services

kubectl get deploy,sts -A --field-selector "$(
  kubectl get ns -l istio.io/rev!=stable -o name \
  | sed -E 's#^[^/]+/#metadata.namespace!=#' \
  | paste -sd, -
)" -o json
  • istio 를 사용중인 namespace 에 있는 모든 deployment 와 sts 를 추출하는 명령어
  • istio sidecar proxy 가 재시작해야 업그레이드가 완료되기 때문에 위 명령어를 통해 재시작할 리소스들을 구분

ArgoCD v3 Degraded issue

Schema violations found: spec.preserveUnknownFields: Invalid value: true: must be false

helm-git 에러

Failed to load target state: failed to generate manifest for source 1 of 1: rpc error: code = Unknown desc = Manifest generation error (cached): plugin sidecar failed. error generating manifests in cmp: rpc error: code = Unknown desc = error generating manifests: /home/argocd/cmp-server/config/cmp.sh failed exit status 1: Error: no matches found Error: Chart.yaml file is missing Error: plugin "helm-git" exited with error
  • cmp.sh 에서 실행되는 helm template 명령어에서 valueFiles 에 포함된 git repoURL 이 존재하지 않을 경우 발생
  • 새로운 클러스터를 만든 팀에서 클러스터 전용 value 파일을 작성하지 않아서 생긴 이슈
  • templating 으로 자동 생성된 라인이었음, git repoURL 에 맞는 파일을 생성해서 해결