2.3. CLI を使用した Red Hat OpenShift GitOps Operator のインストール
CLI を使用して OperatorHub から Red Hat OpenShift GitOps Operator をインストールできます。
手順
Subscription オブジェクトの YAML ファイルを作成し、namespace を Red Hat OpenShift GitOps にサブスクライブします (例:
sub.yaml)。Subscription の例
apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: openshift-gitops-operator namespace: openshift-operators spec: channel: latest1 installPlanApproval: Automatic name: openshift-gitops-operator2 source: redhat-operators3 sourceNamespace: openshift-marketplace4 Subscriptionをクラスターに適用します。$ oc apply -f openshift-gitops-sub.yamlインストールが完了したら、
openshift-gitopsnamespace のすべての Pod が実行されていることを確認します。$ oc get pods -n openshift-gitops出力例
NAME READY STATUS RESTARTS AGE cluster-b5798d6f9-zr576 1/1 Running 0 65m kam-69866d7c48-8nsjv 1/1 Running 0 65m openshift-gitops-application-controller-0 1/1 Running 0 53m openshift-gitops-applicationset-controller-6447b8dfdd-5ckgh 1/1 Running 0 65m openshift-gitops-redis-74bd8d7d96-49bjf 1/1 Running 0 65m openshift-gitops-repo-server-c999f75d5-l4rsg 1/1 Running 0 65m openshift-gitops-server-5785f7668b-wj57t 1/1 Running 0 53m