This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.1.14.3. Ingress 트래픽 관리
Red Hat OpenShift Service Mesh에서 Ingress Gateway는 모니터링, 보안 및 라우팅 규칙과 같은 기능을 클러스터에 들어오는 트래픽에 적용할 수 있도록 합니다. 서비스 메시 게이트웨이를 사용하여 서비스 메시 외부에서 서비스를 노출합니다.
1.14.3.1. Ingress IP 및 포트 확인 링크 복사링크가 클립보드에 복사되었습니다!
Ingress 구성은 환경에서 외부 로드 밸런서를 지원하는지 여부에 따라 달라집니다. 외부 로드 밸런서는 클러스터의 Ingress IP 및 포트에 설정됩니다. 클러스터의 IP 및 포트가 외부 로드 밸런서에 구성되어 있는지 확인하려면 다음 명령을 실행합니다. 이 예제에서 istio-system
은 컨트롤 플레인 프로젝트의 이름입니다.
oc get svc istio-ingressgateway -n istio-system
$ oc get svc istio-ingressgateway -n istio-system
해당 명령은 네임스페이스에 있는 각 항목의 NAME
, TYPE
, CLUSTER-IP
, EXTERNAL-IP
, PORT(S)
, AGE
를 반환합니다.
EXTERNAL-IP
값이 설정되면 해당 환경에 Ingress 게이트웨이에 사용할 수 있는 외부 로드 밸런서가 있습니다.
EXTERNAL-IP
값이 <none>
또는 영구적으로 <pending>
인 경우, 해당 환경은 Ingress 게이트웨이에 외부 로드 밸런서를 제공하지 않습니다. 서비스의 노드 포트를 사용하여 게이트웨이에 액세스할 수 있습니다.
환경에 따라 Ingress를 결정합니다. 로드 밸런서가 지원되는 환경의 경우 로드 밸런서를 사용하여 Ingress 포트를 결정합니다. 로드 밸런서가 지원되지 않는 환경의 경우 로드 밸런서 없이 Ingress 포트를 결정합니다. Ingress 포트를 확인한 후 게이트웨이를 사용한 Ingress 설정을 완료합니다.
1.14.3.1.1. 로드 밸런서를 사용하여 Ingress 포트 확인 링크 복사링크가 클립보드에 복사되었습니다!
환경에 외부 로드 밸런서가 있는 경우 다음 지침을 따릅니다.
절차
다음 명령을 실행하여 Ingress IP 및 포트를 설정합니다. 이 명령은 터미널에서 변수를 설정합니다.
export INGRESS_HOST=$(oc -n istio-system get service istio-ingressgateway -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
$ export INGRESS_HOST=$(oc -n istio-system get service istio-ingressgateway -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 다음 명령을 실행하여 Ingress 포트를 설정합니다.
export INGRESS_PORT=$(oc -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="http2")].port}')
$ export INGRESS_PORT=$(oc -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="http2")].port}')
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 다음 명령을 실행하여 보안 Ingress 포트를 설정합니다.
export SECURE_INGRESS_PORT=$(oc -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="https")].port}')
$ export SECURE_INGRESS_PORT=$(oc -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="https")].port}')
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 다음 명령을 실행하여 TCP Ingress 포트를 설정합니다.
export TCP_INGRESS_PORT=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="tcp")].port}')
$ export TCP_INGRESS_PORT=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="tcp")].port}')
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
일부 환경에서는 IP 주소 대신 호스트 이름을 사용하여 로드 밸런서가 노출될 수 있습니다. 이 경우 Ingress 게이트웨이의 EXTERNAL-IP
값은 IP 주소가 아닙니다. 대신 호스트 이름이며 이전 명령은 INGRESS_HOST
환경 변수를 설정하지 못합니다.
이 경우 다음 명령을 사용하여 INGRESS_HOST
값을 수정합니다.
export INGRESS_HOST=$(oc -n istio-system get service istio-ingressgateway -o jsonpath='{.status.loadBalancer.ingress[0].hostname}')
$ export INGRESS_HOST=$(oc -n istio-system get service istio-ingressgateway -o jsonpath='{.status.loadBalancer.ingress[0].hostname}')
1.14.3.1.2. 로드 밸런서 없이 Ingress 포트 확인 링크 복사링크가 클립보드에 복사되었습니다!
환경에 외부 로드 밸런서가 없는 경우 Ingress 포트를 확인하고 대신 노드 포트를 사용합니다.
절차
Ingress 포트를 설정합니다.
export INGRESS_PORT=$(oc -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="http2")].nodePort}')
$ export INGRESS_PORT=$(oc -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="http2")].nodePort}')
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 다음 명령을 실행하여 보안 Ingress 포트를 설정합니다.
export SECURE_INGRESS_PORT=$(oc -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="https")].nodePort}')
$ export SECURE_INGRESS_PORT=$(oc -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="https")].nodePort}')
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 다음 명령을 실행하여 TCP Ingress 포트를 설정합니다.
export TCP_INGRESS_PORT=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="tcp")].nodePort}')
$ export TCP_INGRESS_PORT=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="tcp")].nodePort}')
Copy to Clipboard Copied! Toggle word wrap Toggle overflow