인프라 노드의 GitOps 워크로드


Red Hat OpenShift GitOps 1.15

인프라 노드에서 GitOps 컨트롤 플레인 워크로드 실행

Red Hat OpenShift Documentation Team

초록

이 문서에서는 OpenShift GitOps가 설치한 인프라 노드에서 특정 워크로드를 실행하는 방법을 설명합니다. 또한 기본 워크로드를 인프라 노드로 이동하는 방법도 설명합니다.

1장. 인프라 노드에서 GitOps 컨트롤 플레인 워크로드 실행

인프라 노드를 사용하여 다음 두 가지 기본 목적으로 인프라 워크로드를 분리할 수 있습니다.

  • 서브스크립션 수와 관련된 청구 비용을 방지하려면 다음을 수행합니다.
  • 별도의 유지 관리 및 관리

OpenShift Container Platform을 사용하여 인프라 노드에서 GitOps 컨트롤 플레인 워크로드를 실행할 수 있습니다. 여기에는 이 네임스페이스의 기본 Argo CD 인스턴스를 포함하여 기본적으로 openshift-gitops 네임스페이스의 Red Hat OpenShift GitOps Operator에서 생성한 Operator Pod 및 컨트롤 플레인 워크로드가 포함됩니다.

GitOps 컨트롤 플레인 워크로드를 사용하면 Argo CD 인스턴스가 가능한 것을 완전히 제어하여 클러스터에 여러 개의 격리된 Argo CD 인스턴스를 생성하여 인프라 워크로드를 안전하고 선언적으로 격리할 수 있습니다. 또한 여러 개발자 네임스페이스에서 선언적으로 이러한 Argo CD 인스턴스를 관리할 수 있습니다. 테인트를 사용하면 이러한 노드에서 인프라 구성 요소만 실행되도록 할 수 있습니다.

참고

사용자 네임스페이스에 설치된 다른 모든 Argo CD 인스턴스는 인프라 노드에서 실행할 수 없습니다.

1.1. GitOps 컨트롤 플레인 워크로드를 인프라 노드로 이동

Red Hat OpenShift GitOps에서 설치한 GitOps 컨트롤 플레인 워크로드를 인프라 노드로 이동할 수 있습니다. 다음은 이동할 수 있는 컨트롤 플레인 워크로드입니다.

  • 클러스터 배포 (backend 서비스)
  • openshift-gitops-applicationset-controller 배포
  • openshift-gitops-dex-server deployment
  • openshift-gitops-redis 배포
  • openshift-gitops-redis-ha-haproxy 배포
  • openshift-gitops-repo-sever 배포
  • openshift-gitops-server 배포
  • openshift-gitops-application-controller statefulset
  • openshift-gitops-redis-server statefulset

프로세스

  1. 다음 명령을 실행하여 기존 노드에 인프라로 레이블을 지정합니다.

    $ oc label node <node-name> node-role.kubernetes.io/infra=
    Copy to Clipboard Toggle word wrap
  2. GitOpsService CR(사용자 정의 리소스)을 편집하여 인프라 노드 선택기를 추가합니다.

    $ oc edit gitopsservice -n openshift-gitops
    Copy to Clipboard Toggle word wrap
  3. GitOpsService CR 파일에서 spec 섹션에 runOnInfra 필드를 추가하고 true 로 설정합니다. 이 필드는 openshift-gitops 네임스페이스의 컨트롤 플레인 워크로드를 인프라 노드로 이동합니다.

    apiVersion: pipelines.openshift.io/v1alpha1
    kind: GitopsService
    metadata:
      name: cluster
    spec:
      runOnInfra: true
    Copy to Clipboard Toggle word wrap
  4. 선택 사항: 테인트를 적용하고 인프라 노드에 워크로드를 분리하고 다른 워크로드가 이러한 노드에서 예약되지 않도록 합니다.

    $ oc adm taint nodes -l node-role.kubernetes.io/infra
    infra=reserved:NoSchedule infra=reserved:NoExecute
    Copy to Clipboard Toggle word wrap
  5. 선택 사항: 노드에 테인트를 적용하는 경우 GitOpsService CR에 허용 오차를 추가할 수 있습니다.

    spec:
      runOnInfra: true
      tolerations:
      - effect: NoSchedule
        key: infra
        value: reserved
      - effect: NoExecute
        key: infra
        value: reserved
    Copy to Clipboard Toggle word wrap

워크로드가 Red Hat OpenShift GitOps 네임스페이스의 인프라 노드에 예약되었는지 확인하려면 Pod 이름을 클릭하고 노드 선택기허용 오차 가 추가되었는지 확인합니다.

참고

기본 Argo CD CR에 수동으로 추가된 노드 선택기허용 오차GitOpsService CR의 토글 및 허용 오차로 덮어씁니다.

1.2. GitOps Operator Pod를 인프라 노드로 이동

GitOps Operator Pod를 인프라 노드로 이동할 수 있습니다.

사전 요구 사항

  • OpenShift Container Platform 클러스터에 Red Hat OpenShift GitOps Operator를 설치했습니다.
  • cluster-admin 권한이 있는 클러스터에 액세스할 수 있습니다.

프로세스

  1. 다음 명령을 실행하여 기존 노드에 인프라 노드로 레이블을 지정합니다.

    $ oc label node <node_name> node-role.kubernetes.io/infra= 
    1
    Copy to Clipboard Toggle word wrap
    1
    <node_name>을 인프라 노드로 레이블을 지정할 노드 이름으로 바꿉니다.

    출력 예

    node/<node_name> labeled
    Copy to Clipboard Toggle word wrap

  2. 다음 명령을 실행하여 Red Hat OpenShift GitOps Subscription 리소스를 편집합니다.

    $ oc -n openshift-gitops-operator edit subscription openshift-gitops-operator
    Copy to Clipboard Toggle word wrap
  3. Subscription 리소스의 spec.config 필드에 nodeSelectortolerations 를 추가합니다.

    서브스크립션의 예

    apiVersion: operators.coreos.com/v1alpha1
    kind: Subscription
    metadata:
      name: openshift-gitops-operator
      namespace: openshift-gitops-operator
    spec:
      config:
        nodeSelector: 
    1
    
          node-role.kubernetes.io/infra: ""
        tolerations: 
    2
    
        - key: node-role.kubernetes.io/infra
          operator: Exists
          effect: NoSchedule
    Copy to Clipboard Toggle word wrap

    1
    이렇게 하면 Operator Pod가 인프라 노드에만 예약됩니다.
    2
    이렇게 하면 인프라 노드에서 Pod를 승인할 수 있습니다.

    출력 예

    subscription.operators.coreos.com/openshift-gitops-operator edited
    Copy to Clipboard Toggle word wrap

  4. 다음 명령을 실행하여 GitOps Operator Pod가 인프라 노드에서 실행 중인지 확인합니다.

    $ oc -n openshift-gitops-operator get po -owide
    Copy to Clipboard Toggle word wrap

    출력 예

    NAME                                                            READY   STATUS    RESTARTS   AGE   IP              NODE            NOMINATED NODE   READINESS GATES
    openshift-gitops-operator-controller-manager-abcd               2/2     Running   0          11m   94.142.44.126   <node_name>     <none>           <none> 
    1
    Copy to Clipboard Toggle word wrap

    1
    나열된 < node_name >이 node-role.kubernetes.io/infra 라벨이 있는 노드인지 확인합니다.

법적 공지

Copyright © 2025 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