이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 1. Setting up an Argo CD instance


By default, the Red Hat OpenShift GitOps installs an instance of Argo CD in the openshift-gitops namespace with additional permissions for managing certain cluster-scoped resources. To manage cluster configurations or deploy applications, you can install and deploy a new Argo CD instance. By default, any new instance has permissions to manage resources only in the namespace where it is deployed.

1.1. Installing an Argo CD instance

To manage cluster configurations or deploy applications, you can install and deploy a new Argo CD instance.

Prerequisites

  • You have access to the cluster with cluster-admin privileges.
  • You have installed the Red Hat OpenShift GitOps Operator on your OpenShift Container Platform cluster.

Procedure

  1. Log in to the OpenShift Container Platform web console.
  2. In the Administrator perspective of the web console, click Operators Installed Operators.
  3. Create or select the project where you want to install the Argo CD instance from the Project drop-down menu.
  4. Select OpenShift GitOps Operator from the installed operators list and click the Argo CD tab.
  5. Click Create ArgoCD to configure the parameters:

    1. Enter the Name of the instance. By default, the Name is set to example.
    2. Create an external OS Route to access Argo CD server. Click Server Route and check Enabled.
    3. Optional: You can also configure YAML for creating an external OS Route by adding the following configuration:

      Example Argo CD with external OS route created

      apiVersion: argoproj.io/v1beta1
      kind: ArgoCD
      metadata:
        name: example
        namespace: openshift-gitops
      spec:
        server:
          route:
            enabled: true
      Copy to Clipboard Toggle word wrap

  6. Go to Networking Routes <instance_name>-server in the project where the Argo CD instance is installed.
  7. On the Details tab, click the Argo CD web UI link under Route details Location. The Argo CD web UI opens in a separate browser window.
  8. Optional: To log in with your OpenShift Container Platform credentials, ensure you are a user of the cluster-admins group and then select the LOG IN VIA OPENSHIFT option in the Argo CD user interface.

    Note

    To be a user of the cluster-admins group, use the oc adm groups new cluster-admins <user> command, where <user> is the default cluster role that you can bind to users and groups cluster-wide or locally.

  9. Obtain the password for the Argo CD instance:

    1. Use the navigation panel to go to the Workloads Secrets page.
    2. Use the Project drop-down list and select the namespace where the Argo CD instance is created.
    3. Select the <argo_CD_instance_name>-cluster instance to display the password.
    4. On the Details tab, copy the password under Data admin.password.
  10. Use admin as the Username and the copied password as the Password to log in to the Argo CD UI in the new window.

1.2. Enabling replicas for Argo CD server and repo server

Argo CD-server and Argo CD-repo-server workloads are stateless. To better distribute your workloads among pods, you can increase the number of Argo CD-server and Argo CD-repo-server replicas. However, if a horizontal autoscaler is enabled on the Argo CD-server, it overrides the number of replicas you set.

Procedure

  • Set the replicas parameters for the repo and server spec to the number of replicas you want to run:

    Example Argo CD custom resource

    apiVersion: argoproj.io/v1beta1
    kind: ArgoCD
    metadata:
      name: example-argocd
      labels:
        example: repo
    spec:
      repo:
        replicas: <number_of_replicas>
      server:
        replicas: <number_of_replicas>
        route:
          enabled: true
          path: /
          tls:
            insecureEdgeTerminationPolicy: Redirect
            termination: passthrough
          wildcardPolicy: None
    Copy to Clipboard Toggle word wrap

1.3. Deploying resources to a different namespace

To allow Argo CD to manage resources in other namespaces apart from where it is installed, configure the target namespace with a argocd.argoproj.io/managed-by label.

Procedure

  • Configure the target namespace by running the following command:

    $ oc label namespace <target_namespace> \
    argocd.argoproj.io/managed-by=<argocd_namespace>
    Copy to Clipboard Toggle word wrap

    where:

    <target_namespace>
    Specifies the name of the namespace you want Argo CD to manage.
    <argocd_namespace>
    Specifies the name of the namespace where Argo CD is installed.
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

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

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

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

Red Hat 소개

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

Theme

© 2025 Red Hat