1.26.4.2.2. 명령줄에서 서비스 메시에 대한 분산 추적 보안 구성

Jaeger 리소스를 수정하여 oc 유틸리티를 사용하여 명령줄에서 Service Mesh와 함께 사용할 분산 추적 플랫폼 보안을 구성할 수 있습니다.

사전 요구 사항

  • cluster-admin 역할의 사용자로 클러스터에 액세스할 수 있어야 합니다. Red Hat OpenShift Dedicated를 사용하는 경우 dedicated-admin 역할의 계정이 있어야 합니다.
  • Red Hat OpenShift Service Mesh Operator가 설치되어 있어야 합니다.
  • ServiceMeshControlPlane 이 클러스터에 배포됩니다.
  • OpenShift Container Platform 버전과 일치하는 OpenShift CLI(oc)에 액세스할 수 있습니다.

프로세스

  1. cluster-admin 역할의 사용자로 OpenShift Container Platform CLI에 로그인합니다. Red Hat OpenShift Dedicated를 사용하는 경우 dedicated-admin 역할의 계정이 있어야 합니다.

    $ oc login https://<HOSTNAME>:6443
  2. 다음 명령을 입력하여 컨트롤 플레인을 설치한 프로젝트(예: istio-system )로 변경합니다.

    $ oc project istio-system
  3. 다음 명령을 실행하여 Jaeger 사용자 정의 리소스 파일을 편집합니다. 여기서 jaeger.yaml 은 Jaeger 사용자 정의 리소스의 이름입니다.

    $ oc edit -n tracing-system -f jaeger.yaml
  4. Jaeger 사용자 정의 리소스 파일을 편집하여 다음 예와 같이 htpasswd 구성을 추가합니다.

    • spec.ingress.openshift.htpasswdFile
    • spec.volumes
    • spec.volumeMounts

      htpasswd 구성을 표시하는 Jaeger 리소스의 예

      apiVersion: jaegertracing.io/v1
      kind: Jaeger
      spec:
        ingress:
          enabled: true
          openshift:
            htpasswdFile: /etc/proxy/htpasswd/auth
            sar: '{"namespace": "istio-system", "resource": "pods", "verb": "get"}'
          options: {}
          resources: {}
          security: oauth-proxy
        volumes:
          - name: secret-htpasswd
            secret:
              secretName: htpasswd
          - configMap:
              defaultMode: 420
              items:
                - key: ca-bundle.crt
                  path: tls-ca-bundle.pem
              name: trusted-ca-bundle
              optional: true
            name: trusted-ca-bundle
        volumeMounts:
          - mountPath: /etc/proxy/htpasswd
            name: secret-htpasswd
          - mountPath: /etc/pki/ca-trust/extracted/pem/
            name: trusted-ca-bundle
            readOnly: true

  5. 다음 명령을 실행하여 변경 사항을 적용합니다. 여기서 <jaeger.yaml>은 Jaeger 사용자 정의 리소스의 이름입니다.

    $ oc apply -n tracing-system -f <jaeger.yaml>
  6. 다음 명령을 실행하여 Pod 배포의 진행 상황을 확인합니다.

    $ oc get pods -n tracing-system -w