K3s에 SUSE Multi-Linux Manager 5.1 프록시 배포

1. K3s 설치

SUSE Multi-Linux Manager 프록시는 단일 노드 클러스터의 SL Micro 위에서 실행되는 K3s에서 지원됩니다. 이를 다른 Kubernetes 환경에 배포해야 하는 경우 지원팀에 문의하여 평가를 요청해야 합니다.

On the container host machine, install K3s (replace <K3S_HOST_FQDN> with the FQDN of your K3s host):

curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="--tls-san=<K3S_HOST_FQDN>" sh -

2. 도구 설치

The installation requires the mgrpxy and helm packages.

The mgrpxy and helm packages are available in the SUSE Multi-Linux Manager Proxy product repositories.

  1. 설치하려면 다음을 실행:

    transactional-update pkg install helm mgrpxy
  2. 재부팅

2.1. Web UI를 사용하여 프록시 구성 생성

Procedure: Generating a Proxy Container Configuration Using Web UI
  1. Web UI에서 Systems  프록시 구성으로 이동하여 필요한 데이터를 입력합니다.

  2. In the Proxy FQDN field type fully qualified domain name for the proxy.

  3. In the Parent FQDN field type fully qualified domain name for the SUSE Multi-Linux Manager Server or another SUSE Multi-Linux Manager Proxy.

  4. In the Proxy SSH port field type SSH port on which SSH service is listening on SUSE Multi-Linux Manager Proxy. Recommended is to keep default 8022.

  5. In the Max Squid cache size [MB] field type maximal allowed size for Squid cache. Recommended is to use at most 80% of available storage for the containers.

    2GB는 기본 프록시 squid 캐시 크기입니다. 사용자의 환경에 적합하도록 조정해야 합니다.

In the SSL certificate selection list choose if new server certificate should be generated for SUSE Multi-Linux Manager Proxy or an existing one should be used. You can consider generated certificates as SUSE Multi-Linux Manager builtin (self signed) certificates.

+

선택에 따라 새 인증서를 생성하기 위해 CA 인증서에 서명할 경로 또는 프록시 인증서로 사용할 기존 인증서 및 해당 키에 대한 경로를 입력하십시오.

+

The CA certificates generated by the server are stored in the /var/lib/containers/storage/volumes/root/_data/ssl-build directory.

+

기존 또는 사용자 정의 인증서와 기업 및 중간 인증서의 개념에 대한 자세한 내용은 SSL 인증서 임포트에서 확인할 수 있습니다.

  1. Click Generate to register a new proxy FQDN in the SUSE Multi-Linux Manager Server and generate a configuration archive (config.tar.gz) containing details for the container host.

  2. 잠시 후 다운로드할 파일이 표시됩니다. 이 파일을 로컬에 저장합니다.

2.2. Generate Proxy Configuration With spacecmd and Self-Signed Certificate

You can generate a Proxy configuration using spacecmd.

절차: spacecmd 및 자체 서명 인증서를 사용하여 프록시 구성 생성
  1. 컨테이너 호스트에 SSH로 연결합니다.

  2. 서버 및 프록시 FQDN을 바꾸는 다음 명령을 실행합니다.

    mgrctl exec -ti 'spacecmd proxy_container_config_generate_cert -- dev-pxy.example.com dev-srv.example.com 2048 email@example.com -o /tmp/config.tar.gz'
  3. 서버 컨테이너에서 생성된 구성을 복사합니다.

    mgrctl cp server:/tmp/config.tar.gz .

2.3. Generate Proxy Configuration With spacecmd and Custom Certificate

You can generate a Proxy configuration using spacecmd for custom certificates rather than the default self-signed certificates.

절차: spacecmd 및 사용자 정의 인증서를 사용하여 프록시 구성 생성
  1. 서버 컨테이너 호스트에 SSH로 연결합니다.

  2. 서버 및 프록시 FQDN을 바꾸는 다음 명령을 실행합니다.

    for f in ca.crt proxy.crt proxy.key; do
      mgrctl cp $f server:/tmp/$f
    done
    mgrctl exec -ti 'spacecmd proxy_container_config -- -p 8022 pxy.example.com srv.example.com 2048 email@example.com /tmp/ca.crt /tmp/proxy.crt /tmp/proxy.key -o /tmp/config.tar.gz'
  3. 설정에서 중간 CA를 사용하는 경우, 이를 복사하여 -i 옵션과 함께 명령에 포함시킵니다(필요한 경우 여러 번 제공 가능).

    mgrctl cp intermediateCA.pem server:/tmp/intermediateCA.pem
    mgrctl exec -ti 'spacecmd proxy_container_config -- -p 8022 -i /tmp/intermediateCA.pem pxy.example.com srv.example.com 2048 email@example.com /tmp/ca.crt /tmp/proxy.crt /tmp/proxy.key -o /tmp/config.tar.gz'
  4. 서버 컨테이너에서 생성된 구성을 복사합니다.

    mgrctl cp server:/tmp/config.tar.gz .

3. SUSE Multi-Linux Manager 프록시 Helm 차트 배포

SUSE Multi-Linux Manager 프록시 Pod에서 사용할 볼륨의 스토리지를 구성하려면 다음 클레임에 대한 영구 볼륨을 정의합니다. 스토리지 구성을 사용자 정의하지 않으면 K3s가 자동으로 스토리지 볼륨을 생성합니다.

영구 볼륨 클레임의 이름은 다음과 같습니다.

  • squid-cache-pv-claim

  • package-cache-pv-claim

  • tftp-boot-pv-claim

Create the configuration for the SUSE Multi-Linux Manager Proxy as documented in SUSE Multi-Linux Manager Proxy Deployment. Copy the configuration tar.gz file and then install:

mgrpxy install kubernetes /path/to/config.tar.gz

자세한 내용은 https://kubernetes.io/docs/concepts/storage/persistent-volumes/(kubernetes) 또는 https://rancher.com/docs/k3s/latest/en/storage/(K3s) 설명서를 참조하십시오.