kubernetes 배포를 사용하여 nodejs 앱의 Single Sign-On을 사용하는 방법은 무엇입니까?

kubernetes 배포를 사용하여 nodejs 앱의 Single Sign-On을 사용하는 방법은 무엇입니까?

Express 및 Microsoft 인증을 사용하여 샘플 node.js 앱에서 Single SignOn을 설정해 보았습니다.

이는 단계와소스코드 링크

로컬로 실행하면 작동합니다. kubernetes에 보관하고 로드 밸런서 서비스 IP를 사용하여 직접 액세스하면 작동합니다. 그러나 Azure Ubuntu 시스템에 k3s VM을 배포하고 Azure 앱 게이트웨이를 동일한 네트워크에 유지하고 이 부하 분산 장치 IP로 라우팅하도록 트래픽을 구성하면 로그인 페이지로 이동합니다. 웹페이지가 로드됨

하지만 "로그인" 버튼을 클릭하면 502 Bad Gateway오류가 발생합니다. 502 오류

새로고침을 클릭하면 로그에 오류가 발생합니다. 해당 오류가 발생했을 때의 Pod 로그입니다.

      onocspresponse: [Function: onocspresponse],
      onnewsession: [Function: onnewsessionclient],
      onerror: [Function: onerror],
      [Symbol(owner_symbol)]: [Circular *1]
    },
    _requestCert: true,
    _rejectUnauthorized: true,
    parser: null,
    _httpMessage: [Circular *2],
    [Symbol(res)]: TLSWrap {
      _parent: TCP {
        reading: [Getter/Setter],
        onconnection: null,
        [Symbol(owner_symbol)]: [Circular *1]
      },
      _parentWrap: undefined,
      _secureContext: SecureContext { context: SecureContext {} },
      reading: true,
      onkeylog: [Function: onkeylog],
      onhandshakestart: {},
      onhandshakedone: [Function (anonymous)],
      onocspresponse: [Function: onocspresponse],
      onnewsession: [Function: onnewsessionclient],
      onerror: [Function: onerror],
      [Symbol(owner_symbol)]: [Circular *1]
    },
    [Symbol(verified)]: true,
    [Symbol(pendingSession)]: null,
    [Symbol(async_id_symbol)]: 76,
    [Symbol(kHandle)]: TLSWrap {
      _parent: TCP {
        reading: [Getter/Setter],
        onconnection: null,
        [Symbol(owner_symbol)]: [Circular *1]
      },
      _parentWrap: undefined,
      _secureContext: SecureContext { context: SecureContext {} },
      reading: true,
      onkeylog: [Function: onkeylog],
      onhandshakestart: {},
      onhandshakedone: [Function (anonymous)],
      onocspresponse: [Function: onocspresponse],
      onnewsession: [Function: onnewsessionclient],
      onerror: [Function: onerror],
      [Symbol(owner_symbol)]: [Circular *1]
    },
    [Symbol(lastWriteQueueSize)]: 0,
    [Symbol(timeout)]: null,
    [Symbol(kBuffer)]: null,
    [Symbol(kBufferCb)]: null,
    [Symbol(kBufferGen)]: null,
    [Symbol(kCapture)]: false,
    [Symbol(kSetNoDelay)]: false,
    [Symbol(kSetKeepAlive)]: true,
    [Symbol(kSetKeepAliveInitialDelay)]: 60,
    [Symbol(kBytesRead)]: 0,
    [Symbol(kBytesWritten)]: 0,
    [Symbol(connect-options)]: {
      rejectUnauthorized: true,
      ciphers: 'TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA256:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!SRP:!CAMELLIA',
      checkServerIdentity: [Function: checkServerIdentity],
      minDHSize: 1024,
      maxRedirects: 21,
      maxBodyLength: Infinity,
      protocol: 'https:',
      path: null,
      method: 'GET',
      headers: [Object: null prototype] { To bottom Logs from 9/12/2023, 11:19:18 AM

관련 정보