보안


Red Hat OpenShift GitOps 1.10

보안 기능을 사용하여 보안 통신을 구성하고 전송 시 잠재적으로 민감한 데이터를 보호합니다.

Red Hat OpenShift Documentation Team

초록

이 문서에서는 OpenShift GitOps와 함께 TLS(Transport Layer Security) 암호화를 사용하는 방법에 대해 설명합니다. 또한 전송 시 잠재적으로 민감한 데이터를 보호하기 위해 Redis와 보안 통신을 구성하는 방법도 설명합니다.

1장. Redis를 사용하여 보안 통신 구성

Red Hat OpenShift GitOps와 함께 TLS(Transport Layer Security) 암호화를 사용하면 Argo CD 구성 요소와 Redis 캐시 간의 통신을 보호하고 전송 시 중요한 데이터를 보호할 수 있습니다.

다음 구성 중 하나를 사용하여 Redis와의 통신을 보호할 수 있습니다.

  • autotls 설정을 활성화하여 TLS 암호화에 적절한 인증서를 발급합니다.
  • 키 및 인증서 쌍으로 argocd-operator-redis-tls 시크릿을 생성하여 TLS 암호화를 수동으로 구성합니다.

두 구성 모두 HA(고가용성)를 활성화하거나 사용하지 않고 사용할 수 있습니다.

1.1. 사전 요구 사항

  • cluster-admin 권한이 있는 클러스터에 액세스할 수 있습니다.
  • OpenShift Container Platform 웹 콘솔에 액세스할 수 있습니다.
  • Red Hat OpenShift GitOps Operator가 클러스터에 설치되어 있습니다.

1.2. autotls가 활성화된 Redis의 TLS 구성

새 또는 기존 Argo CD 인스턴스에서 autotls 설정을 활성화하여 Redis에 대한 TLS 암호화를 구성할 수 있습니다. 이 구성은 argocd-operator-redis-tls 시크릿을 자동으로 프로비저닝하고 추가 단계가 필요하지 않습니다. 현재 OpenShift Container Platform은 지원되는 유일한 시크릿 공급자입니다.

참고

기본적으로 autotls 설정은 비활성화되어 있습니다.

프로세스

  1. OpenShift Container Platform 웹 콘솔에 로그인합니다.
  2. autotls 가 활성화된 Argo CD 인스턴스를 생성합니다.

    1. 웹 콘솔의 관리자 화면에서 왼쪽 탐색 패널을 사용하여 AdministrationCustomResourceDefinitions 로 이동합니다.
    2. argocds.argoproj.io 를 검색하고 ArgoCD CRD(사용자 정의 리소스 정의)를 클릭합니다.
    3. CustomResourceDefinition 세부 정보 페이지에서 Instances 탭을 클릭한 다음 Create ArgoCD 를 클릭합니다.
    4. 다음 예와 유사한 YAML을 편집하거나 교체합니다.

      autotls가 활성화된 Argo CD CR의 예

      apiVersion: argoproj.io/v1beta1
      kind: ArgoCD
      metadata:
        name: argocd 
      1
      
        namespace: openshift-gitops 
      2
      
      spec:
        redis:
          autotls: openshift 
      3
      
        ha:
          enabled: true 
      4
      Copy to Clipboard Toggle word wrap

      1
      Argo CD 인스턴스의 이름입니다.
      2
      Argo CD 인스턴스를 실행할 네임스페이스입니다.
      3
      autotls 설정을 활성화하고 Redis에 대한 TLS 인증서를 생성하는 플래그입니다.
      4
      HA 기능을 활성화하는 플래그 값입니다. HA를 활성화하지 않으려면 이 행을 포함하지 않거나 플래그 값을 false 로 설정합니다.
      작은 정보

      또는 다음 명령을 실행하여 기존 Argo CD 인스턴스에서 autotls 설정을 활성화할 수 있습니다.

      $ oc patch argocds.argoproj.io <instance-name> --type=merge -p '{"spec":{"redis":{"autotls":"openshift"}}}'
      Copy to Clipboard Toggle word wrap
    5. 생성을 클릭합니다.
    6. Argo CD Pod가 준비되어 실행 중인지 확인합니다.

      $ oc get pods -n <namespace> 
      1
      Copy to Clipboard Toggle word wrap
      1
      Argo CD 인스턴스가 실행 중인 네임스페이스를 지정합니다(예: openshift-gitops ).

      HA가 비활성화된 출력 예

      NAME                                  READY   STATUS    RESTARTS   AGE
      argocd-application-controller-0       1/1     Running   0          26s
      argocd-redis-84b77d4f58-vp6zm         1/1     Running   0          37s
      argocd-repo-server-5b959b57f4-znxjq   1/1     Running   0          37s
      argocd-server-6b8787d686-wv9zh        1/1     Running   0          37s
      Copy to Clipboard Toggle word wrap

      참고

      HA 지원 TLS 구성에는 작업자 노드가 3개 이상인 클러스터가 필요합니다. HA 구성으로 Argo CD 인스턴스를 활성화한 경우 출력이 표시되는 데 몇 분이 걸릴 수 있습니다.

      HA가 활성화된 출력 예

      NAME                                       READY   STATUS    RESTARTS   AGE
      argocd-application-controller-0            1/1     Running   0          10m
      argocd-redis-ha-haproxy-669757fdb7-5xg8h   1/1     Running   0          10m
      argocd-redis-ha-server-0                   2/2     Running   0          9m9s
      argocd-redis-ha-server-1                   2/2     Running   0          98s
      argocd-redis-ha-server-2                   2/2     Running   0          53s
      argocd-repo-server-576499d46d-8hgbh        1/1     Running   0          10m
      argocd-server-9486f88b7-dk2ks              1/1     Running   0          10m
      Copy to Clipboard Toggle word wrap

  3. argocd-operator-redis-tls 보안이 생성되었는지 확인합니다.

    $ oc get secrets argocd-operator-redis-tls -n <namespace> 
    1
    Copy to Clipboard Toggle word wrap
    1
    Argo CD 인스턴스가 실행 중인 네임스페이스를 지정합니다(예: openshift-gitops ).

    출력 예

    NAME                        TYPE                DATA   AGE
    argocd-operator-redis-tls   kubernetes.io/tls   2      30s
    Copy to Clipboard Toggle word wrap

    시크릿은 kubernetes.io/tls 유형이어야 하며 크기는 2 여야 합니다.

1.3. autotls가 비활성화된 상태로 Redis의 TLS 구성

키 및 인증서 쌍으로 argocd-operator-redis-tls 시크릿을 생성하여 Redis에 대한 TLS 암호화를 수동으로 구성할 수 있습니다. 또한 적절한 Argo CD 인스턴스에 속해 있음을 나타내려면 시크릿에 주석을 달아야 합니다. 인증서 및 보안을 생성하는 단계는 HA(고가용성)가 활성화된 인스턴스에 따라 다릅니다.

프로세스

  1. OpenShift Container Platform 웹 콘솔에 로그인합니다.
  2. Argo CD 인스턴스를 생성합니다.

    1. 웹 콘솔의 관리자 화면에서 왼쪽 탐색 패널을 사용하여 AdministrationCustomResourceDefinitions 로 이동합니다.
    2. argocds.argoproj.io 를 검색하고 ArgoCD CRD(사용자 정의 리소스 정의)를 클릭합니다.
    3. CustomResourceDefinition 세부 정보 페이지에서 Instances 탭을 클릭한 다음 Create ArgoCD 를 클릭합니다.
    4. 다음 예와 유사한 YAML을 편집하거나 교체합니다.

      autotls가 비활성화된 ArgoCD CR의 예

      apiVersion: argoproj.io/v1beta1
      kind: ArgoCD
      metadata:
        name: argocd 
      1
      
        namespace: openshift-gitops 
      2
      
      spec:
        ha:
          enabled: true 
      3
      Copy to Clipboard Toggle word wrap

      1
      Argo CD 인스턴스의 이름입니다.
      2
      Argo CD 인스턴스를 실행할 네임스페이스입니다.
      3
      HA 기능을 활성화하는 플래그 값입니다. HA를 활성화하지 않으려면 이 행을 포함하지 않거나 플래그 값을 false 로 설정합니다.
    5. 생성을 클릭합니다.
    6. Argo CD Pod가 준비되어 실행 중인지 확인합니다.

      $ oc get pods -n <namespace> 
      1
      Copy to Clipboard Toggle word wrap
      1
      Argo CD 인스턴스가 실행 중인 네임스페이스를 지정합니다(예: openshift-gitops ).

      HA가 비활성화된 출력 예

      NAME                                  READY   STATUS    RESTARTS   AGE
      argocd-application-controller-0       1/1     Running   0          26s
      argocd-redis-84b77d4f58-vp6zm         1/1     Running   0          37s
      argocd-repo-server-5b959b57f4-znxjq   1/1     Running   0          37s
      argocd-server-6b8787d686-wv9zh        1/1     Running   0          37s
      Copy to Clipboard Toggle word wrap

      참고

      HA 지원 TLS 구성에는 작업자 노드가 3개 이상인 클러스터가 필요합니다. HA 구성으로 Argo CD 인스턴스를 활성화한 경우 출력이 표시되는 데 몇 분이 걸릴 수 있습니다.

      HA가 활성화된 출력 예

      NAME                                       READY   STATUS    RESTARTS   AGE
      argocd-application-controller-0            1/1     Running   0          10m
      argocd-redis-ha-haproxy-669757fdb7-5xg8h   1/1     Running   0          10m
      argocd-redis-ha-server-0                   2/2     Running   0          9m9s
      argocd-redis-ha-server-1                   2/2     Running   0          98s
      argocd-redis-ha-server-2                   2/2     Running   0          53s
      argocd-repo-server-576499d46d-8hgbh        1/1     Running   0          10m
      argocd-server-9486f88b7-dk2ks              1/1     Running   0          10m
      Copy to Clipboard Toggle word wrap

  3. HA 구성에 따라 다음 옵션 중 하나를 사용하여 Redis 서버에 대한 자체 서명 인증서를 생성합니다.

    • HA가 비활성화된 Argo CD 인스턴스의 경우 다음 명령을 실행합니다.

      $ openssl req -new -x509 -sha256 \
        -subj "/C=XX/ST=XX/O=Testing/CN=redis" \
        -reqexts SAN -extensions SAN \
        -config <(printf "\n[SAN]\nsubjectAltName=DNS:argocd-redis.<namespace>.svc.cluster.local\n[req]\ndistinguished_name=req") \ 
      1
      
        -keyout /tmp/redis.key \
        -out /tmp/redis.crt \
        -newkey rsa:4096 \
        -nodes \
        -sha256 \
        -days 10
      Copy to Clipboard Toggle word wrap
      1
      Argo CD 인스턴스가 실행 중인 네임스페이스를 지정합니다(예: openshift-gitops ).

      출력 예

      Generating a RSA private key
      ...............++++
      ............................++++
      writing new private key to '/tmp/redis.key'
      Copy to Clipboard Toggle word wrap

    • HA가 활성화된 Argo CD 인스턴스의 경우 다음 명령을 실행합니다.

      $ openssl req -new -x509 -sha256 \
        -subj "/C=XX/ST=XX/O=Testing/CN=redis" \
        -reqexts SAN -extensions SAN \
        -config <(printf "\n[SAN]\nsubjectAltName=DNS:argocd-redis-ha-haproxy.<namespace>.svc.cluster.local\n[req]\ndistinguished_name=req") \ 
      1
      
        -keyout /tmp/redis-ha.key \
        -out /tmp/redis-ha.crt \
        -newkey rsa:4096 \
        -nodes \
        -sha256 \
        -days 10
      Copy to Clipboard Toggle word wrap
      1
      Argo CD 인스턴스가 실행 중인 네임스페이스를 지정합니다(예: openshift-gitops ).

      출력 예

      Generating a RSA private key
      ...............++++
      ............................++++
      writing new private key to '/tmp/redis-ha.key'
      Copy to Clipboard Toggle word wrap

  4. 다음 명령을 실행하여 생성된 인증서 및 키를 /tmp 디렉토리에서 사용할 수 있는지 확인합니다.

    $ cd /tmp
    Copy to Clipboard Toggle word wrap
    $ ls
    Copy to Clipboard Toggle word wrap

    HA가 비활성화된 출력 예

    ...
    redis.crt
    redis.key
    ...
    Copy to Clipboard Toggle word wrap

    HA가 활성화된 출력 예

    ...
    redis-ha.crt
    redis-ha.key
    ...
    Copy to Clipboard Toggle word wrap

  5. HA 구성에 따라 다음 옵션 중 하나를 사용하여 argocd-operator-redis-tls 시크릿을 생성합니다.

    • HA가 비활성화된 Argo CD 인스턴스의 경우 다음 명령을 실행합니다.

      $ oc create secret tls argocd-operator-redis-tls --key=/tmp/redis.key --cert=/tmp/redis.crt
      Copy to Clipboard Toggle word wrap
    • HA가 활성화된 Argo CD 인스턴스의 경우 다음 명령을 실행합니다.

      $ oc create secret tls argocd-operator-redis-tls --key=/tmp/redis-ha.key --cert=/tmp/redis-ha.crt
      Copy to Clipboard Toggle word wrap

      출력 예

      secret/argocd-operator-redis-tls created
      Copy to Clipboard Toggle word wrap

  6. Argo CD CR에 속함을 나타내기 위해 보안에 주석을 답니다.

    $ oc annotate secret argocd-operator-redis-tls argocds.argoproj.io/name=<instance-name> 
    1
    Copy to Clipboard Toggle word wrap
    1
    Argo CD 인스턴스의 이름을 지정합니다(예: argocd ).

    출력 예

    secret/argocd-operator-redis-tls annotated
    Copy to Clipboard Toggle word wrap

  7. Argo CD Pod가 준비되어 실행 중인지 확인합니다.

    $ oc get pods -n <namespace> 
    1
    Copy to Clipboard Toggle word wrap
    1
    Argo CD 인스턴스가 실행 중인 네임스페이스를 지정합니다(예: openshift-gitops ).

    HA가 비활성화된 출력 예

    NAME                                  READY   STATUS    RESTARTS   AGE
    argocd-application-controller-0       1/1     Running   0          26s
    argocd-redis-84b77d4f58-vp6zm         1/1     Running   0          37s
    argocd-repo-server-5b959b57f4-znxjq   1/1     Running   0          37s
    argocd-server-6b8787d686-wv9zh        1/1     Running   0          37s
    Copy to Clipboard Toggle word wrap

    참고

    HA 구성으로 Argo CD 인스턴스를 활성화한 경우 출력이 표시되는 데 몇 분이 걸릴 수 있습니다.

    HA가 활성화된 출력 예

    NAME                                       READY   STATUS    RESTARTS   AGE
    argocd-application-controller-0            1/1     Running   0          10m
    argocd-redis-ha-haproxy-669757fdb7-5xg8h   1/1     Running   0          10m
    argocd-redis-ha-server-0                   2/2     Running   0          9m9s
    argocd-redis-ha-server-1                   2/2     Running   0          98s
    argocd-redis-ha-server-2                   2/2     Running   0          53s
    argocd-repo-server-576499d46d-8hgbh        1/1     Running   0          10m
    argocd-server-9486f88b7-dk2ks              1/1     Running   0          10m
    Copy to Clipboard Toggle word wrap

법적 공지

Copyright © 2024 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat