Red Hat Training

A Red Hat training course is available for OpenShift Container Platform

8.3.4.2.8. combinations

다음은 특정 요구 사항에 대한 소스 복제 보안을 생성하기 위해 위의 방법을 결합하는 방법에 대한 몇 가지 예입니다.

  1. .gitconfig 파일을 사용하여 SSH 기반 인증 보안을 생성하려면 다음을 수행합니다.

    $ oc create secret generic <secret_name> \
        --from-file=ssh-privatekey=<path/to/ssh/private/key> \
        --from-file=<path/to/.gitconfig> \
        --type=kubernetes.io/ssh-auth
  2. .gitconfig 파일 및 CA 인증서를 결합하는 보안을 생성하려면 다음을 수행합니다.

    $ oc create secret generic <secret_name> \
        --from-file=ca.crt=<path/to/certificate> \
        --from-file=<path/to/.gitconfig>
  3. CA 인증서 파일을 사용하여 기본 인증 보안을 생성하려면 다음을 수행합니다.

    $ oc create secret generic <secret_name> \
        --from-literal=username=<user_name> \
        --from-literal=password=<password> \
        --from-file=ca.crt=</path/to/file> \
        --type=kubernetes.io/basic-auth
  4. .gitconfig 파일을 사용하여 기본 인증 보안을 생성하려면 다음을 수행합니다.

    $ oc create secret generic <secret_name> \
        --from-literal=username=<user_name> \
        --from-literal=password=<password> \
        --from-file=</path/to/.gitconfig> \
        --type=kubernetes.io/basic-auth
  5. .gitconfig 파일 및 CA 인증서 파일을 사용하여 기본 인증 보안을 생성하려면 다음을 수행합니다.

    $ oc create secret generic <secret_name> \
        --from-literal=username=<user_name> \
        --from-literal=password=<password> \
        --from-file=</path/to/.gitconfig> \
        --from-file=ca.crt=</path/to/file> \
        --type=kubernetes.io/basic-auth